diff options
author | jimw@mysql.com <> | 2005-07-21 20:08:54 -0700 |
---|---|---|
committer | jimw@mysql.com <> | 2005-07-21 20:08:54 -0700 |
commit | 6eae678f563f375c93361720b7a074dfa88caf92 (patch) | |
tree | 1b22b9007d1f9e9e9b6492eafcf7dd7b276a126c /sql/unireg.cc | |
parent | ac6623f08fe059e4ee49c4f3eaa73198b8ca9d82 (diff) | |
download | mariadb-git-6eae678f563f375c93361720b7a074dfa88caf92.tar.gz |
Fix error message generated when trying to create a table in a
non-existent database. (Bug #10407)
Diffstat (limited to 'sql/unireg.cc')
-rw-r--r-- | sql/unireg.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/unireg.cc b/sql/unireg.cc index e6484a9c1c2..a3d461513b8 100644 --- a/sql/unireg.cc +++ b/sql/unireg.cc @@ -56,6 +56,8 @@ static bool make_empty_rec(int file, enum db_type table_type, mysql_create_frm() thd Thread handler file_name Name of file (including database and .frm) + table Name of table + db Name of database create_info create info parameters create_fields Fields to create keys number of keys to create @@ -68,6 +70,7 @@ static bool make_empty_rec(int file, enum db_type table_type, */ 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_fields, uint keys, KEY *key_info, @@ -114,7 +117,7 @@ bool mysql_create_frm(THD *thd, my_string file_name, reclength=uint2korr(forminfo+266); null_fields=uint2korr(forminfo+282); - if ((file=create_frm(file_name, reclength, fileinfo, + if ((file=create_frm(file_name, table, db, reclength, fileinfo, create_info, keys)) < 0) { my_free((gptr) screen_buff,MYF(0)); @@ -213,9 +216,11 @@ err3: Create a frm (table definition) file and the tables SYNOPSIS - mysql_create_frm() + rea_create_table() thd Thread handler file_name Name of file (including database and .frm) + table Name of table + db Name of database create_info create info parameters create_fields Fields to create keys number of keys to create @@ -228,13 +233,14 @@ err3: */ 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_fields, uint keys, KEY *key_info) { DBUG_ENTER("rea_create_table"); - if (mysql_create_frm(thd, file_name, create_info, + if (mysql_create_frm(thd, file_name, table, db, create_info, create_fields, keys, key_info, NULL)) DBUG_RETURN(1); if (ha_create_table(file_name,create_info,0)) |