mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: select ... into
tests
* automatically disable ps2 and cursor protocol when the select statement returns no result set * remove manual {disable|enable}_{ps2|cursor}_protocol from around `select ... into` in tests * other misc collateral test cleanups
This commit is contained in:
@@ -560,11 +560,7 @@ DROP TABLE t;
|
||||
--echo #
|
||||
CREATE TABLE t (id INT) ENGINE=InnoDB;
|
||||
--replace_result $MYSQLTEST_VARDIR VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select 1 into outfile "$MYSQLTEST_VARDIR/tmp/t.outfile";
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
BEGIN;
|
||||
--replace_result $MYSQLTEST_VARDIR VARDIR
|
||||
eval LOAD DATA INFILE '$MYSQLTEST_VARDIR/tmp/t.outfile' INTO TABLE t;
|
||||
|
@@ -130,11 +130,7 @@ INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES
|
||||
INSERT INTO t1 (f1,f2,f3,f4,f5,f6,f7,f8) VALUES ('impact', 'b', 'h', 185, 'fj', 7, 7, 3);
|
||||
|
||||
ALTER TABLE t1 ADD COLUMN filler VARCHAR(255) DEFAULT '';
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
SELECT * INTO OUTFILE 'load.data' FROM t1;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
UPDATE IGNORE t1 SET pk = 0;
|
||||
LOAD DATA INFILE 'load.data' REPLACE INTO TABLE t1;
|
||||
HANDLER t1 OPEN AS h;
|
||||
|
@@ -142,12 +142,7 @@ update ignore t5 set c1 = 20 where c1 = 140 ;
|
||||
select count(*) from t5 where c1 = 140;
|
||||
|
||||
--replace_result $MYSQLTEST_VARDIR VARDIR
|
||||
--disable_cursor_protocol
|
||||
--disable_ps2_protocol
|
||||
eval select * into outfile "$MYSQLTEST_VARDIR/tmp/t5.outfile" from t5;
|
||||
--enable_ps2_protocol
|
||||
--enable_cursor_protocol
|
||||
|
||||
|
||||
create temporary table temp_1 engine = innodb as select * from t5 where 1=2;
|
||||
select count(*) from temp_1;
|
||||
|
Reference in New Issue
Block a user