summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@mashka.mysql.fi>2003-10-16 03:08:40 +0300
committerunknown <monty@mashka.mysql.fi>2003-10-16 03:08:40 +0300
commitaff45e1b0733947abde48f712c1af64b4f2549a7 (patch)
treebd2eb4ac5dffdd3ac1af40b53a3680a0a9d78195 /sql/sql_table.cc
parent893797be02d4dff2e1aafbdb98ac4e33b9726628 (diff)
parent0fc97bc9e5c6c0a4f380841b325f6f0647a90bb5 (diff)
downloadmariadb-git-aff45e1b0733947abde48f712c1af64b4f2549a7.tar.gz
merge with 4.0
BitKeeper/deleted/.del-MYSQL.ICO~d93519b5f0d6ee1: Auto merged client/client_priv.h: Auto merged extra/resolveip.c: Auto merged include/mysql.h: Auto merged include/thr_alarm.h: Auto merged myisam/myisamchk.c: Auto merged scripts/mysql_config.sh: Auto merged scripts/mysqld_safe.sh: Auto merged sql/slave.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_handler.cc: Auto merged sql/sql_insert.cc: Auto merged sql/sql_parse.cc: Auto merged sql/sql_test.cc: Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc9
1 files changed, 8 insertions, 1 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index d2f6b508aa4..5417a1b0368 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -901,7 +901,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);
}
@@ -913,14 +916,18 @@ int mysql_create_table(THD *thd,const char *db, const char *table_name,
if (!access(path,F_OK))
{
if (create_info->options & HA_LEX_CREATE_IF_NOT_EXISTS)
+ {
+ create_info->table_existed= 1; // Mark that table existed
error= 0;
+ }
else
- my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
+ my_error(ER_TABLE_EXISTS_ERROR,MYF(0),table_name);
goto end;
}
}
thd->proc_info="creating table";
+ create_info->table_existed= 0; // Mark that table is created
if (thd->variables.sql_mode & MODE_NO_DIR_IN_CREATE)
create_info->data_file_name= create_info->index_file_name= 0;