summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorAlexey Kopytov <Alexey.Kopytov@sun.com>2009-07-24 15:50:45 +0400
committerAlexey Kopytov <Alexey.Kopytov@sun.com>2009-07-24 15:50:45 +0400
commit885292e424fb640703c972ba126a99e042383abe (patch)
tree62abcd715db4c6a6154ff1b71d27588b63c84ff2 /sql/sql_select.cc
parent924c8c5bfbc346de72d27a06fa5d6cb87b471c08 (diff)
downloadmariadb-git-885292e424fb640703c972ba126a99e042383abe.tar.gz
Bug #46075: Assertion failed: 0, file .\protocol.cc, line 416
In create_myisam_from_heap() mark all errors as fatal except HA_ERR_RECORD_FILE_FULL for a HEAP table. Not doing so could lead to problems, e.g. in a case when a temporary MyISAM table gets overrun due to its MAX_ROWS limit while executing INSERT/REPLACE IGNORE ... SELECT. The SELECT execution was aborted, but the error was converted to a warning due to IGNORE clause, so neither 'ok' nor 'error' packet could be sent back to the client. This condition led to hanging client when using 5.0 server, or assertion failure in 5.1. mysql-test/r/insert_select.result: Added a test case for bug #46075. mysql-test/t/insert_select.test: Added a test case for bug #46075. sql/sql_select.cc: In create_myisam_from_heap() mark all errors as fatal except HA_ERR_RECORD_FILE_FULL for a HEAP table.
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 672ebaf9259..214434f29dd 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -10276,6 +10276,11 @@ bool create_myisam_from_heap(THD *thd, TABLE *table, TMP_TABLE_PARAM *param,
if (table->s->db_type != DB_TYPE_HEAP || error != HA_ERR_RECORD_FILE_FULL)
{
+ /*
+ We don't want this error to be converted to a warning, e.g. in case of
+ INSERT IGNORE ... SELECT.
+ */
+ thd->is_fatal_error= 1;
table->file->print_error(error,MYF(0));
DBUG_RETURN(1);
}