diff --git a/mysql-test/r/innodb.result b/mysql-test/r/innodb.result index 4cec61faf0d29e24750962eb541439bf2b96a16e..5e5130618215a26e53a53f263a97390e793b608c 100644 --- a/mysql-test/r/innodb.result +++ b/mysql-test/r/innodb.result @@ -1440,3 +1440,6 @@ third 2 3 drop table t1; +create table t1 (a int) engine=innodb; +create table t2 like t1; +drop table t1,t2; diff --git a/mysql-test/t/innodb.test b/mysql-test/t/innodb.test index 5602a57905b7c2c9381dc9856adbee07f64362af..e20be83b4b61aa88d87f98e746a34494bf1f99ed 100644 --- a/mysql-test/t/innodb.test +++ b/mysql-test/t/innodb.test @@ -1037,3 +1037,10 @@ create table t1 (id int, name char(10) not null, name2 char(10) not null) engi insert into t1 values(1,'first','fff'),(2,'second','sss'),(3,'third','ttt'); select name2 from t1 union all select name from t1 union all select id from t1; drop table t1; + +# +# Bug2160 +# +create table t1 (a int) engine=innodb; +create table t2 like t1; +drop table t1,t2; diff --git a/sql/ha_innodb.h b/sql/ha_innodb.h index 4efde3e95d25c162accd39d4ceb6a2538d283aa4..a9e8c146d695f0dedaf83a383291f4812c51e38a 100644 --- a/sql/ha_innodb.h +++ b/sql/ha_innodb.h @@ -95,7 +95,6 @@ class ha_innobase: public handler HA_NOT_EXACT_COUNT | HA_NO_WRITE_DELAYED | HA_PRIMARY_KEY_IN_READ_INDEX | - HA_DROP_BEFORE_CREATE | HA_TABLE_SCAN_ON_INDEX), last_dup_key((uint) -1), start_of_scan(0)