#
# Bug #32125: Database crash due to ha_innodb.cc:3896: ulint convert_search_mode_to_innobase
# http://bugs.mysql.com/bug.php?id=32125
#
# Fixed in 5.0.54, 5.1.23, 6.0.4, 5.5.5-m3, 5.1.47-ndb-7.0.16, 5.1.47-ndb-6.2.19, 5.1.47-ndb-6.3.35
# Not fixed in 4.1.25!
#

DROP TABLE IF EXISTS test;

CREATE TABLE `test` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY,
  `foo` text NOT NULL
) ENGINE=InnoDB
DEFAULT CHARSET=latin1;

SELECT * FROM test WHERE CONTAINS(foo, 'bar');
ALTER TABLE test ADD INDEX (foo(100));
SELECT * FROM test WHERE CONTAINS(foo, 'bar');
