1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-24 19:42:23 +03:00
Files
mariadb/mysql-test/suite/innodb/r/alter_copy.result
Monty 9cba6c5aa3 Updated mtr files to support different compiled in options
This allows one to run the test suite even if any of the following
options are changed:
- character-set-server
- collation-server
- join-cache-level
- log-basename
- max-allowed-packet
- optimizer-switch
- query-cache-size and query-cache-type
- skip-name-resolve
- table-definition-cache
- table-open-cache
- Some innodb options
etc

Changes:
- Don't print out the value of system variables as one can't depend on
  them to being constants.
- Don't set global variables to 'default' as the default may not
  be the same as the test was started with if there was an additional
  option file. Instead save original value and reset it at end of test.
- Test that depends on the latin1 character set should include
  default_charset.inc or set the character set to latin1
- Test that depends on the original optimizer switch, should include
  default_optimizer_switch.inc
- Test that depends on the value of a specific system variable should
  set it in the test (like optimizer_use_condition_selectivity)
- Split subselect3.test into subselect3.test and subselect3.inc to
  make it easier to set and reset system variables.
- Added .opt files for test that required specfic options that could
  be changed by external configuration files.
- Fixed result files in rockdsb & tokudb that had not been updated for
  a while.
2019-09-01 19:17:35 +03:00

221 lines
5.6 KiB
Plaintext

#
# MDEV-11415 AVOID INTERMEDIATE COMMIT WHILE DOING
# ALTER TABLE...ALGORITHM=COPY
#
CREATE TABLE t(a SERIAL, b INT, c INT, d INT) ENGINE=InnoDB;
CREATE TABLE t1(a INT, b TEXT, c TEXT,
FULLTEXT(b), FULLTEXT(c(3)), FULLTEXT(b,c)) ENGINE=InnoDB;
BEGIN;
COMMIT;
SELECT COUNT(*) FROM t;
COUNT(*)
999
UPDATE t SET b=a%7, c=a%11, d=a%13;
INSERT INTO t1 VALUES(1, 'This is a first b column', 'This is a first c column');
INSERT INTO t1 VALUES(2, 'This is a second b column', 'This is a second c column');
INSERT INTO t1(a) VALUES(3);
INSERT INTO t1 VALUES(4, 'This is a third b column', 'This is a third c column');
DELETE FROM t1 WHERE a = 2;
SELECT * FROM t1 WHERE MATCH(b) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(c) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(b,c) AGAINST ('column');
a b c
1 This is a first b column This is a first c column
4 This is a third b column This is a third c column
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL,
`c` text DEFAULT NULL,
FULLTEXT KEY `b` (`b`),
FULLTEXT KEY `c` (`c`),
FULLTEXT KEY `b_2` (`b`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
ALTER TABLE t1 FORCE, ALGORITHM=COPY;
connect hang,localhost,root;
SET DEBUG_SYNC='alter_table_copy_trans_commit SIGNAL hung WAIT_FOR ever';
# create 32 secondary indexes
ALTER TABLE t ADD INDEX(b,c,d,a),ADD INDEX(b,c,a,d),ADD INDEX(b,a,c,d),ADD INDEX(b,a,d,c),
ADD INDEX(b,d,a,c),ADD INDEX(b,d,c,a),ADD INDEX(a,b,c,d),ADD INDEX(a,b,d,c),
ADD INDEX(a,c,b,d),ADD INDEX(a,c,d,b),ADD INDEX(a,d,b,c),ADD INDEX(a,d,c,b),
ADD INDEX(c,a,b,d),ADD INDEX(c,a,d,b),ADD INDEX(c,b,a,d),ADD INDEX(c,b,d,a),
ADD INDEX(c,d,a,b),ADD INDEX(c,d,b,a),ADD INDEX(d,a,b,c),ADD INDEX(d,a,c,b),
ADD INDEX(d,b,a,c),ADD INDEX(d,b,c,a),ADD INDEX(d,c,a,b),ADD INDEX(d,c,b,a),
ADD INDEX(a,b,c), ADD INDEX(a,c,b), ADD INDEX(a,c,d), ADD INDEX(a,d,c),
ADD INDEX(a,b,d), ADD INDEX(a,d,b), ADD INDEX(b,c,d), ADD INDEX(b,d,c),
ALGORITHM=COPY;
connection default;
SET DEBUG_SYNC='now WAIT_FOR hung';
disconnect hang;
#sql-temporary.frm
#sql-temporary.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTSBEING_DELETED.ibd
FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm
t1.ibd
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t;
COUNT(*)
999
CHECK TABLE t;
Table Op Msg_type Msg_text
test.t check status OK
SELECT * FROM t1 WHERE MATCH(b) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(c) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(b,c) AGAINST ('column');
a b c
1 This is a first b column This is a first c column
4 This is a third b column This is a third c column
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL,
`c` text DEFAULT NULL,
FULLTEXT KEY `b` (`b`),
FULLTEXT KEY `c` (`c`),
FULLTEXT KEY `b_2` (`b`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
#sql-temporary.frm
#sql-temporary.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTSBEING_DELETED.ibd
FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm
t1.ibd
SHOW CREATE TABLE t;
Table Create Table
t CREATE TABLE `t` (
`a` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`b` int(11) DEFAULT NULL,
`c` int(11) DEFAULT NULL,
`d` int(11) DEFAULT NULL,
UNIQUE KEY `a` (`a`)
) ENGINE=InnoDB AUTO_INCREMENT=1000 DEFAULT CHARSET=latin1
SELECT COUNT(*) FROM t;
COUNT(*)
999
CHECK TABLE t;
Table Op Msg_type Msg_text
test.t check status OK
SELECT * FROM t1 WHERE MATCH(b) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(c) AGAINST ('first');
a b c
1 This is a first b column This is a first c column
SELECT * FROM t1 WHERE MATCH(b,c) AGAINST ('column');
a b c
1 This is a first b column This is a first c column
4 This is a third b column This is a third c column
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL,
`c` text DEFAULT NULL,
FULLTEXT KEY `b` (`b`),
FULLTEXT KEY `c` (`c`),
FULLTEXT KEY `b_2` (`b`,`c`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
#sql-temporary.frm
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTS_INDEX_1.ibd
FTS_INDEX_2.ibd
FTS_INDEX_3.ibd
FTS_INDEX_4.ibd
FTS_INDEX_5.ibd
FTS_INDEX_6.ibd
FTSBEING_DELETED.ibd
FTSBEING_DELETED_CACHE.ibd
FTSCONFIG.ibd
FTSDELETED.ibd
FTSDELETED_CACHE.ibd
db.opt
t.frm
t.ibd
t1.frm
t1.ibd
DROP TABLE t1,t;