nodirtyrockstar Posted October 3, 2012 Share Posted October 3, 2012 MYSQL version --> 5.0.91 ALTER TABLE products ENGINE=INNODB; The error is that it responds that it changed the engine type, but when I view the database in mysqladmin, the tables are still MYISAM. I really wish I saved the CREATE TABLE commands. Basically, there are three tables. The variable types are VARCHAR, INT, TINYINT, DECIMAL, DATETIME, and YEAR. There are no null fields. One of the tables is a JOIN table, and all three of them possess foreign keys. Please let me know if I left out anything, and thank you in advance for your consideration. I threw together a couple of screen shots. Above the red line shows my command and the response showing that I successfully changed the sessions table. Below the red line shows what I see when I view the database in mysqladmin; the sessions table still has a MYISAM engine type. Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/ Share on other sites More sharing options...
Barand Posted October 3, 2012 Share Posted October 3, 2012 MYSQL version --> 5.0.91 I really wish I saved the CREATE TABLE commands. SHOW CREATE TABLE tablename Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/#findComment-1382396 Share on other sites More sharing options...
nodirtyrockstar Posted October 3, 2012 Author Share Posted October 3, 2012 CREATE TABLE `sessions` ( `id` varchar(255) NOT NULL, `created` datetime NOT NULL, `expired` datetime NOT NULL, `completed` tinyint(1) NOT NULL, `price` decimal(6,2) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `products` ( `id` varchar(20) NOT NULL, `artist` varchar(30) NOT NULL, `title` varchar(30) NOT NULL, `artwork` varchar(255) NOT NULL, `label` varchar(30) NOT NULL, `year` year(4) NOT NULL, `price` decimal(6,2) NOT NULL, `qty` int(11) NOT NULL, `cartLnk` varchar(255) NOT NULL, `agedOff` tinyint(1) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 CREATE TABLE `sessProdLnk` ( `products_id` varchar(20) NOT NULL, `sessions_id` varchar(255) NOT NULL, `qty` int(6) NOT NULL, KEY `products_id` (`products_id`), KEY `sessions_id` (`sessions_id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/#findComment-1382398 Share on other sites More sharing options...
nodirtyrockstar Posted October 3, 2012 Author Share Posted October 3, 2012 (edited) I could have sworn that I originally created them with InnoDB engines. BTW thanks for the tip. Edited October 3, 2012 by nodirtyrockstar Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/#findComment-1382400 Share on other sites More sharing options...
fenway Posted October 3, 2012 Share Posted October 3, 2012 There's a strict mode option that prevents silent conversion of engine types -- use it. Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/#findComment-1382427 Share on other sites More sharing options...
nodirtyrockstar Posted October 3, 2012 Author Share Posted October 3, 2012 I just discovered today that fatcow does not support InnoDB tables for shared hosting plans. For that and other reasons, I will not be renewing my contract with them. Thank you everyone who spent their time on this. Quote Link to comment https://forums.phpfreaks.com/topic/269025-cant-alter-table-to-engineinnodbstrange-problems/#findComment-1382556 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.