summaryrefslogtreecommitdiff
path: root/mysql-test/r/insert_select.result
diff options
context:
space:
mode:
authorunknown <ingo@mysql.com>2005-01-19 21:16:27 +0100
committerunknown <ingo@mysql.com>2005-01-19 21:16:27 +0100
commit699a530a0a7915a50ed2e042ff7e5f088f9d359a (patch)
tree35ace0defa95ca054f917494cc043c64af98c289 /mysql-test/r/insert_select.result
parente46d235a08a35bdd5536b4b2b99ed3a5b6910cdf (diff)
downloadmariadb-git-699a530a0a7915a50ed2e042ff7e5f088f9d359a.tar.gz
BUG#6034 - Error code 124: Wrong medium type.
Version for 4.1. Committed for merge. If the result table is one of the select tables in INSERT SELECT, we must not disable the result tables indexes before selecting. mysql_execute_command() detects the match for other reasons and adds the flag OPTION_BUFFER_RESULT to the 'select_options'. In this case the result is put into a temporary table first. Hence, we can defer the preparation of the insert table until the result is to be used. mysql-test/r/insert_select.result: BUG#6034 - Error code 124: Wrong medium type. The test results. mysql-test/t/insert_select.test: BUG#6034 - Error code 124: Wrong medium type. The test case. sql/sql_select.cc: BUG#6034 - Error code 124: Wrong medium type. With OPTION_BUFFER_RESULT in the 'select_options', defer the preparation of the insert table until the result is to be used.
Diffstat (limited to 'mysql-test/r/insert_select.result')
-rw-r--r--mysql-test/r/insert_select.result12
1 files changed, 12 insertions, 0 deletions
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 0a6a34f9a58..f5ad0c87881 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -638,3 +638,15 @@ No Field Count
0 1 100
0 2 100
drop table t1, t2;
+CREATE TABLE t1 (
+ID int(11) NOT NULL auto_increment,
+NO int(11) NOT NULL default '0',
+SEQ int(11) NOT NULL default '0',
+PRIMARY KEY (ID),
+KEY t1$NO (SEQ,NO)
+) ENGINE=MyISAM;
+INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1);
+select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
+ID NO SEQ
+1 1 1
+drop table t1;