Loading mysql-test/r/create.result +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ Note 1051 Unknown table 't1' create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table not_existing_database.test (a int); Got one of the listed errors ERROR 42000: Unknown database 'not_existing_database' create table `a/a` (a int); ERROR 42000: Incorrect table name 'a/a' create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int); Loading Loading @@ -342,7 +342,7 @@ create table t3 like t1; create table t3 like mysqltest.t3; ERROR 42S01: Table 't3' already exists create table non_existing_database.t1 like t1; Got one of the listed errors ERROR 42000: Unknown database 'non_existing_database' create table t3 like non_existing_table; ERROR 42S02: Unknown table 'non_existing_table' create temporary table t3 like t1; Loading mysql-test/t/create.test +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ drop table if exists t1; --error 1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; -- error 1044,1 -- error 1049 create table not_existing_database.test (a int); --error 1103 create table `a/a` (a int); Loading Loading @@ -294,7 +294,7 @@ select * from t2; create table t3 like t1; --error 1050 create table t3 like mysqltest.t3; --error 1044,1 --error 1049 create table non_existing_database.t1 like t1; --error 1051 create table t3 like non_existing_table; Loading sql/mysql_priv.h +6 −2 Original line number Diff line number Diff line Loading @@ -1029,10 +1029,13 @@ void unlock_table_names(THD *thd, TABLE_LIST *table_list, void unireg_init(ulong options); void unireg_end(void); bool mysql_create_frm(THD *thd, my_string file_name, const char *table, const char* db, HA_CREATE_INFO *create_info, List<create_field> &create_field, uint key_count,KEY *key_info,handler *db_type); int rea_create_table(THD *thd, my_string file_name,HA_CREATE_INFO *create_info, int rea_create_table(THD *thd, my_string file_name, const char *table, const char* db, HA_CREATE_INFO *create_info, List<create_field> &create_field, uint key_count,KEY *key_info); int format_number(uint inputflag,uint max_length,my_string pos,uint length, Loading Loading @@ -1104,7 +1107,8 @@ ulong make_new_entry(File file,uchar *fileinfo,TYPELIB *formnames, const char *newname); ulong next_io_size(ulong pos); void append_unescaped(String *res, const char *pos, uint length); int create_frm(char *name,uint reclength,uchar *fileinfo, int create_frm(char *name, const char *table, const char *db, uint reclength,uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys); void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form); int rename_file_ext(const char * from,const char * to,const char * ext); Loading sql/sql_table.cc +9 −5 Original line number Diff line number Diff line Loading @@ -1418,12 +1418,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, create_info->data_file_name= create_info->index_file_name= 0; create_info->table_options=db_options; if (rea_create_table(thd, path, create_info, fields, key_count, if (rea_create_table(thd, path, table_name, db, create_info, fields, key_count, key_info_buffer)) { /* my_error(ER_CANT_CREATE_TABLE,MYF(0),table_name,my_errno); */ goto end; } if (create_info->options & HA_LEX_CREATE_TMP_TABLE) { /* Open table and put in temporary table list */ Loading Loading @@ -2366,8 +2364,14 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table, /* Create a new table by copying from source table */ if (my_copy(src_path, dst_path, MYF(MY_WME|MY_DONT_OVERWRITE_FILE))) if (my_copy(src_path, dst_path, MYF(MY_DONT_OVERWRITE_FILE))) { if (my_errno == ENOENT) my_error(ER_BAD_DB_ERROR,MYF(0),db); else my_error(ER_CANT_CREATE_FILE,MYF(0),dst_path,my_errno); goto err; } /* As mysql_truncate don't work on a new table at this stage of Loading sql/table.cc +10 −2 Original line number Diff line number Diff line Loading @@ -1238,7 +1238,8 @@ void append_unescaped(String *res, const char *pos, uint length) /* Create a .frm file */ File create_frm(register my_string name, uint reclength, uchar *fileinfo, File create_frm(register my_string name, const char *table, const char *db, uint reclength, uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys) { register File file; Loading @@ -1263,7 +1264,7 @@ File create_frm(register my_string name, uint reclength, uchar *fileinfo, */ set_if_smaller(create_info->raid_chunks, 255); if ((file= my_create(name, CREATE_MODE, create_flags, MYF(MY_WME))) >= 0) if ((file= my_create(name, CREATE_MODE, create_flags, MYF(0))) >= 0) { bzero((char*) fileinfo,64); fileinfo[0]=(uchar) 254; fileinfo[1]= 1; fileinfo[2]= FRM_VER+3; // Header Loading Loading @@ -1300,6 +1301,13 @@ File create_frm(register my_string name, uint reclength, uchar *fileinfo, } } } else { if (my_errno == ENOENT) my_error(ER_BAD_DB_ERROR,MYF(0),db); else my_error(ER_CANT_CREATE_TABLE,MYF(0),table,my_errno); } return (file); } /* create_frm */ Loading Loading
mysql-test/r/create.result +2 −2 Original line number Diff line number Diff line Loading @@ -37,7 +37,7 @@ Note 1051 Unknown table 't1' create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; ERROR 42000: Incorrect table definition; there can be only one auto column and it must be defined as a key create table not_existing_database.test (a int); Got one of the listed errors ERROR 42000: Unknown database 'not_existing_database' create table `a/a` (a int); ERROR 42000: Incorrect table name 'a/a' create table `aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa` (aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa int); Loading Loading @@ -342,7 +342,7 @@ create table t3 like t1; create table t3 like mysqltest.t3; ERROR 42S01: Table 't3' already exists create table non_existing_database.t1 like t1; Got one of the listed errors ERROR 42000: Unknown database 'non_existing_database' create table t3 like non_existing_table; ERROR 42S02: Unknown table 'non_existing_table' create temporary table t3 like t1; Loading
mysql-test/t/create.test +2 −2 Original line number Diff line number Diff line Loading @@ -39,7 +39,7 @@ drop table if exists t1; --error 1075 create table t1 (ordid int(8) not null auto_increment, ord varchar(50) not null, primary key (ord,ordid)) engine=heap; -- error 1044,1 -- error 1049 create table not_existing_database.test (a int); --error 1103 create table `a/a` (a int); Loading Loading @@ -294,7 +294,7 @@ select * from t2; create table t3 like t1; --error 1050 create table t3 like mysqltest.t3; --error 1044,1 --error 1049 create table non_existing_database.t1 like t1; --error 1051 create table t3 like non_existing_table; Loading
sql/mysql_priv.h +6 −2 Original line number Diff line number Diff line Loading @@ -1029,10 +1029,13 @@ void unlock_table_names(THD *thd, TABLE_LIST *table_list, void unireg_init(ulong options); void unireg_end(void); bool mysql_create_frm(THD *thd, my_string file_name, const char *table, const char* db, HA_CREATE_INFO *create_info, List<create_field> &create_field, uint key_count,KEY *key_info,handler *db_type); int rea_create_table(THD *thd, my_string file_name,HA_CREATE_INFO *create_info, int rea_create_table(THD *thd, my_string file_name, const char *table, const char* db, HA_CREATE_INFO *create_info, List<create_field> &create_field, uint key_count,KEY *key_info); int format_number(uint inputflag,uint max_length,my_string pos,uint length, Loading Loading @@ -1104,7 +1107,8 @@ ulong make_new_entry(File file,uchar *fileinfo,TYPELIB *formnames, const char *newname); ulong next_io_size(ulong pos); void append_unescaped(String *res, const char *pos, uint length); int create_frm(char *name,uint reclength,uchar *fileinfo, int create_frm(char *name, const char *table, const char *db, uint reclength,uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys); void update_create_info_from_table(HA_CREATE_INFO *info, TABLE *form); int rename_file_ext(const char * from,const char * to,const char * ext); Loading
sql/sql_table.cc +9 −5 Original line number Diff line number Diff line Loading @@ -1418,12 +1418,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, create_info->data_file_name= create_info->index_file_name= 0; create_info->table_options=db_options; if (rea_create_table(thd, path, create_info, fields, key_count, if (rea_create_table(thd, path, table_name, db, create_info, fields, key_count, key_info_buffer)) { /* my_error(ER_CANT_CREATE_TABLE,MYF(0),table_name,my_errno); */ goto end; } if (create_info->options & HA_LEX_CREATE_TMP_TABLE) { /* Open table and put in temporary table list */ Loading Loading @@ -2366,8 +2364,14 @@ int mysql_create_like_table(THD* thd, TABLE_LIST* table, /* Create a new table by copying from source table */ if (my_copy(src_path, dst_path, MYF(MY_WME|MY_DONT_OVERWRITE_FILE))) if (my_copy(src_path, dst_path, MYF(MY_DONT_OVERWRITE_FILE))) { if (my_errno == ENOENT) my_error(ER_BAD_DB_ERROR,MYF(0),db); else my_error(ER_CANT_CREATE_FILE,MYF(0),dst_path,my_errno); goto err; } /* As mysql_truncate don't work on a new table at this stage of Loading
sql/table.cc +10 −2 Original line number Diff line number Diff line Loading @@ -1238,7 +1238,8 @@ void append_unescaped(String *res, const char *pos, uint length) /* Create a .frm file */ File create_frm(register my_string name, uint reclength, uchar *fileinfo, File create_frm(register my_string name, const char *table, const char *db, uint reclength, uchar *fileinfo, HA_CREATE_INFO *create_info, uint keys) { register File file; Loading @@ -1263,7 +1264,7 @@ File create_frm(register my_string name, uint reclength, uchar *fileinfo, */ set_if_smaller(create_info->raid_chunks, 255); if ((file= my_create(name, CREATE_MODE, create_flags, MYF(MY_WME))) >= 0) if ((file= my_create(name, CREATE_MODE, create_flags, MYF(0))) >= 0) { bzero((char*) fileinfo,64); fileinfo[0]=(uchar) 254; fileinfo[1]= 1; fileinfo[2]= FRM_VER+3; // Header Loading Loading @@ -1300,6 +1301,13 @@ File create_frm(register my_string name, uint reclength, uchar *fileinfo, } } } else { if (my_errno == ENOENT) my_error(ER_BAD_DB_ERROR,MYF(0),db); else my_error(ER_CANT_CREATE_TABLE,MYF(0),table,my_errno); } return (file); } /* create_frm */ Loading