summaryrefslogtreecommitdiff
path: root/sql/mysql_priv.h
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-07-21 20:08:54 -0700
committerunknown <jimw@mysql.com>2005-07-21 20:08:54 -0700
commit41984105287d0c209c2c4a017abb149ca312a831 (patch)
tree1b22b9007d1f9e9e9b6492eafcf7dd7b276a126c /sql/mysql_priv.h
parent31ebc6ef71afaf4605ab5d00ddaf8d548683212d (diff)
downloadmariadb-git-41984105287d0c209c2c4a017abb149ca312a831.tar.gz
Fix error message generated when trying to create a table in a
non-existent database. (Bug #10407) mysql-test/r/create.result: Update results mysql-test/t/create.test: Update error numbers sql/mysql_priv.h: Adjust some other function signature so table and db information is passed down into create_frm(). sql/sql_table.cc: Check for database not existing after hitting an error when copying the .frm file for 'CREATE TABLE ... LIKE ...', and pass table and db name into rea_create_table(). sql/table.cc: Generate specific error message when .frm creation fails because the database does not exist. sql/unireg.cc: Pass database and table name down into create_frm().
Diffstat (limited to 'sql/mysql_priv.h')
-rw-r--r--sql/mysql_priv.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/sql/mysql_priv.h b/sql/mysql_priv.h
index 42e45442f9c..4b570c7bbd1 100644
--- a/sql/mysql_priv.h
+++ b/sql/mysql_priv.h
@@ -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,
@@ -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);