From 4b57720caabb434c055bb67b6cf73e51cb044138 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 13 Feb 2014 20:20:17 +0100 Subject: [PATCH] use a different error for MySQL bug#11747970 - kill the query, as it was supposed to be in bug#11747970, don't fake an error. (this kill can be useful for other bugs too) --- mysql-test/r/error_simulation.result | 2 +- mysql-test/t/error_simulation.test | 2 +- sql/sql_select.cc | 8 +------- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/mysql-test/r/error_simulation.result b/mysql-test/r/error_simulation.result index 6d9ec36bb1d..049900b76c7 100644 --- a/mysql-test/r/error_simulation.result +++ b/mysql-test/r/error_simulation.result @@ -94,7 +94,7 @@ INSERT INTO t1 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2); SET SESSION debug="+d,bug11747970_raise_error"; INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); -ERROR HY000: Unknown error +ERROR 70100: Query execution was interrupted SET SESSION debug = DEFAULT; DROP TABLE t1,t2; # diff --git a/mysql-test/t/error_simulation.test b/mysql-test/t/error_simulation.test index 5dcc1fa9dcf..1048bf85e44 100644 --- a/mysql-test/t/error_simulation.test +++ b/mysql-test/t/error_simulation.test @@ -103,7 +103,7 @@ CREATE TABLE t2(f1 INT); INSERT INTO t1 VALUES (1),(2); INSERT INTO t2 VALUES (1),(2); SET SESSION debug="+d,bug11747970_raise_error"; ---error 1105 +--error ER_QUERY_INTERRUPTED INSERT IGNORE INTO t2 SELECT f1 FROM t1 a WHERE NOT EXISTS (SELECT 1 FROM t2 b WHERE a.f1 = b.f1); SET SESSION debug = DEFAULT; DROP TABLE t1,t2; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 235383622cb..6f96a432a97 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3154,13 +3154,7 @@ make_join_statistics(JOIN *join, List &tables_list, #endif DBUG_EXECUTE_IF("bug11747970_raise_error", - { - if (!error) - { - my_error(ER_UNKNOWN_ERROR, MYF(0)); - goto error; - } - }); + { join->thd->killed= KILL_QUERY_HARD; }); if (error) { table->file->print_error(error, MYF(0));