patternsqlMinor
MySQL insists on trying to use InnoDB even when told not to, please help
Viewed 0 times
toldpleaseinnodbinsiststryinghelpmysqlwhenevenuse
Problem
We're trying out MySQL 5.5, and have installed it on one of our slave servers as a test run. Our main server is 5.0, and we have zero optimization here for InnoDB, so I want everything to just be MyISAM for now. I've disabled InnoDB everywhere I can think, but the replication is throwing errors like:
The query never specifies the engine is InnoDB.
Error 'Unknown storage engine 'InnoDB'' on query. Default database: ''. Query: 'CREATE TEMPORARY TABLE ... SELECT ...The query never specifies the engine is InnoDB.
default-storage-engine is set toMyISAM. innodb is set to OFF. Why is it trying to create this termporary table as InnoDB? This is 5.5, not 5.6, so we don't have the default-tmp-storage-engine variable yet. Please help, this is driving me insane.Solution
To disable InnoDB, add this to /etc/my.cnf on the MySQL 5.5. slave:
and run this on the Slave:
According to MySQL Documentation on CREATE TABLE :
You can create one table from another by adding a SELECT statement at the end of the CREATE TABLE statement:
CREATE TABLE new_tbl SELECT * FROM orig_tbl;
For more information, see Section 13.1.17.1, “CREATE TABLE ... SELECT Syntax”.
Use LIKE to create an empty table based on the definition of another table, including any column attributes and indexes defined in the original table:
CREATE TABLE new_tbl LIKE orig_tbl;
The copy is created using the same version of the table storage format as the original table. The SELECT privilege is required on the original table.
You must specify the ENGINE upon creation
to get around this problem
[mysqld]
skip-innodband run this on the Slave:
service mysql restartAccording to MySQL Documentation on CREATE TABLE :
You can create one table from another by adding a SELECT statement at the end of the CREATE TABLE statement:
CREATE TABLE new_tbl SELECT * FROM orig_tbl;
For more information, see Section 13.1.17.1, “CREATE TABLE ... SELECT Syntax”.
Use LIKE to create an empty table based on the definition of another table, including any column attributes and indexes defined in the original table:
CREATE TABLE new_tbl LIKE orig_tbl;
The copy is created using the same version of the table storage format as the original table. The SELECT privilege is required on the original table.
You must specify the ENGINE upon creation
CREATE TEMPORARY TABLE ... ENGINE=MyISAM SELECT ...to get around this problem
Code Snippets
[mysqld]
skip-innodbservice mysql restartCREATE TEMPORARY TABLE ... ENGINE=MyISAM SELECT ...Context
StackExchange Database Administrators Q#19862, answer score: 3
Revisions (0)
No revisions yet.