From 49eb39097a35781ab6ba394cfdfc7f157a26f4ae Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 8 Oct 2003 18:53:31 +0300 Subject: Fixed bug in error handling of CREATE ... SELECT More tests cases After merge fixes BitKeeper/deleted/.del-ansi-master.opt~4d337eb61642a838: Delete: mysql-test/t/ansi-master.opt mysql-test/r/ansi.result: Cleaned up test to be able to remove ansi-master.opt mysql-test/r/create.result: Updated results mysql-test/r/insert_select.result: Updated results mysql-test/r/rpl000009.result: Updated results mysql-test/t/ansi.test: Cleaned up test to be able to remove ansi-master.opt mysql-test/t/create.test: More tests mysql-test/t/insert_select.test: More tests mysql-test/t/mysqlbinlog.test: Fixed test after merge sql/mysql_priv.h: Added character-sets-dir to 'show variables' sql/set_var.cc: Added character-sets-dir to 'show variables' sql/sql_class.cc: Fixed that send_error() is called properly when a SELECT fails sql/sql_class.h: Fixed that send_error() is called properly when a SELECT fails sql/sql_insert.cc: Fixed bug in error handling of CREATE ... SELECT sql/sql_select.cc: Fixed bug in error handling of CREATE ... SELECT --- sql/sql_insert.cc | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'sql/sql_insert.cc') diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index f4127265ce6..0ad66beec2e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1440,8 +1440,17 @@ void select_insert::send_error(uint errcode,const char *err) { DBUG_ENTER("select_insert::send_error"); - //TODO error should be sent at the query processing end + /* TODO error should be sent at the query processing end */ ::send_error(thd,errcode,err); + + if (!table) + { + /* + This can only happen when using CREATE ... SELECT and the table was not + created becasue of an syntax error + */ + DBUG_VOID_RETURN; + } table->file->extra(HA_EXTRA_NO_CACHE); table->file->activate_all_index(thd); /* -- cgit v1.2.1