diff options
author | unknown <monty@mashka.mysql.fi> | 2003-10-15 21:50:36 +0300 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-10-15 21:50:36 +0300 |
commit | 0fc97bc9e5c6c0a4f380841b325f6f0647a90bb5 (patch) | |
tree | 0ad2e2381b4b10b0164a94b12e0b415c002896dc /sql/sql_table.cc | |
parent | e115c1f46d5007e9bd4abfdd2f2214e7ba7f9428 (diff) | |
parent | b06eb4d81a82be2a215e8b9b726d214c559e3f40 (diff) | |
download | mariadb-git-0fc97bc9e5c6c0a4f380841b325f6f0647a90bb5.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.0
into mashka.mysql.fi:/home/my/mysql-4.0
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r-- | sql/sql_table.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 79105a94dec..94ecf33b9c6 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -728,7 +728,10 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, && find_temporary_table(thd,db,table_name)) { if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + { + create_info->table_existed= 1; // Mark that table existed DBUG_RETURN(0); + } my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); DBUG_RETURN(-1); } @@ -739,13 +742,17 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name, { VOID(pthread_mutex_unlock(&LOCK_open)); if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS) + { + create_info->table_existed= 1; // Mark that table existed DBUG_RETURN(0); + } my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name); DBUG_RETURN(-1); } } thd->proc_info="creating table"; + create_info->table_existed= 0; // Mark that table is created if (thd->sql_mode & MODE_NO_DIR_IN_CREATE) create_info->data_file_name= create_info->index_file_name= 0; |