1
0
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:
Sergei Golubchik
2024-12-13 11:56:31 +01:00
parent 9ee09a33bb
commit e7f7789482
82 changed files with 110 additions and 2338 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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;