From 5bfa1e67419a3a9b7a2b4c938df00428a3b0f44e Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 27 Jul 2006 14:12:41 +0400 Subject: [PATCH] Post-merge fixes. storage/myisam/mi_create.c: Post-merge fixes (Thanks Ingo). --- mysql-test/r/federated.result | 33 +++++++++++++++++---------------- mysql-test/r/myisam.result | 15 +++++++++------ storage/myisam/mi_create.c | 6 ++---- 3 files changed, 28 insertions(+), 26 deletions(-) diff --git a/mysql-test/r/federated.result b/mysql-test/r/federated.result index b7b3af7d60a..4bb279add69 100644 --- a/mysql-test/r/federated.result +++ b/mysql-test/r/federated.result @@ -1603,22 +1603,6 @@ fld_cid fld_name fld_parentid fld_delt 5 Torkel 0 0 DROP TABLE federated.t1; DROP TABLE federated.bug_17377_table; -create table t1 (id int not null auto_increment primary key, val int); -create table t1 -(id int not null auto_increment primary key, val int) engine=federated -connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1'; -insert into t1 values (1,0),(2,0); -update t1 set val = NULL where id = 1; -select * from t1; -id val -1 NULL -2 0 -select * from t1; -id val -1 NULL -2 0 -drop table t1; -drop table t1; drop table if exists federated.t1; create table federated.t1 (a int, b int, c int); drop table if exists federated.t1; @@ -1733,6 +1717,23 @@ id c1 c2 9 abc ppc drop table federated.t1, federated.t2; drop table federated.t1, federated.t2; +create table t1 (id int not null auto_increment primary key, val int); +create table t1 +(id int not null auto_increment primary key, val int) engine=federated +connection='mysql://root@127.0.0.1:SLAVE_PORT/test/t1'; +insert into t1 values (1,0),(2,0); +update t1 set val = NULL where id = 1; +select * from t1; +id val +1 NULL +2 0 +select * from t1; +id val +1 NULL +2 0 +drop table t1; +drop table t1; +End of 5.0 tests DROP TABLE IF EXISTS federated.t1; DROP DATABASE IF EXISTS federated; DROP TABLE IF EXISTS federated.t1; diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result index e78782268ea..e703c162d88 100644 --- a/mysql-test/r/myisam.result +++ b/mysql-test/r/myisam.result @@ -1436,12 +1436,6 @@ show keys from t1; Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment t1 1 a 1 a A 8 NULL NULL YES BTREE drop table t1; -create table t1 (c1 int) engine=myisam pack_keys=0; -create table t2 (c1 int) engine=myisam pack_keys=1; -create table t3 (c1 int) engine=myisam pack_keys=default; -create table t4 (c1 int) engine=myisam pack_keys=2; -ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 -drop table t1, t2, t3; show create table t1; show create table t1; create table t1 (a int) engine=myisam select 42 a; @@ -1455,6 +1449,14 @@ select * from t1; a 42 drop table t1; +End of 4.1 tests +create table t1 (c1 int) engine=myisam pack_keys=0; +create table t2 (c1 int) engine=myisam pack_keys=1; +create table t3 (c1 int) engine=myisam pack_keys=default; +create table t4 (c1 int) engine=myisam pack_keys=2; +ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '2' at line 1 +drop table t1, t2, t3; +End of 5.0 tests create table t1 (a int not null, key `a` (a) key_block_size=1024); show create table t1; Table Create Table @@ -1601,3 +1603,4 @@ create table t1 (a int not null, key key_block_size=1024 (a)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '=1024 (a))' at line 1 create table t1 (a int not null, key `a` key_block_size=1024 (a)); ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'key_block_size=1024 (a))' at line 1 +End of 5.1 tests diff --git a/storage/myisam/mi_create.c b/storage/myisam/mi_create.c index a0b3f657867..f8fad493a91 100644 --- a/storage/myisam/mi_create.c +++ b/storage/myisam/mi_create.c @@ -581,8 +581,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if ((path= strrchr(ci->index_file_name, FN_LIBCHAR))) *path= '\0'; fn_format(filename, name, ci->index_file_name, MI_NAME_IEXT, - MY_REPLACE_DIR | MY_UNPACK_FILENAME | - (have_iext ? MY_REPLACE_EXT : MY_APPEND_EXT)); + MY_REPLACE_DIR | MY_UNPACK_FILENAME | MY_APPEND_EXT); } else { @@ -659,8 +658,7 @@ int mi_create(const char *name,uint keys,MI_KEYDEF *keydefs, if ((path= strrchr(ci->data_file_name, FN_LIBCHAR))) *path= '\0'; fn_format(filename, name, ci->data_file_name, MI_NAME_DEXT, - MY_REPLACE_DIR | MY_UNPACK_FILENAME | - (have_dext ? MY_REPLACE_EXT : MY_APPEND_EXT)); + MY_REPLACE_DIR | MY_UNPACK_FILENAME | MY_APPEND_EXT); } else {