mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.4 into 10.5
This commit is contained in:
Submodule extra/wolfssl/wolfssl updated: 3b3c175af0...66596ad9e1
Submodule libmariadb updated: ae565eea90...9155b19b46
@ -9037,8 +9037,8 @@ SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7;
|
|||||||
b a
|
b a
|
||||||
h 1
|
h 1
|
||||||
n 4
|
n 4
|
||||||
SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ), JSON_VALID(trace) FROM information_schema.optimizer_trace;
|
SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) exp1, JSON_VALID(trace) exp2 FROM information_schema.optimizer_trace;
|
||||||
json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) JSON_VALID(trace)
|
exp1 exp2
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
"conds": "(t1.b <> 'p' or multiple equal(4, t1.a)) and t1.a <= 7",
|
"conds": "(t1.b <> 'p' or multiple equal(4, t1.a)) and t1.a <= 7",
|
||||||
|
@ -797,8 +797,7 @@ set optimizer_trace=DEFAULT;
|
|||||||
CREATE TABLE t1 (a INT, b VARCHAR(1), KEY (a), KEY(b,a)) ENGINE=MEMORY;
|
CREATE TABLE t1 (a INT, b VARCHAR(1), KEY (a), KEY(b,a)) ENGINE=MEMORY;
|
||||||
INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w');
|
INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w');
|
||||||
SET optimizer_trace= 'enabled=on';
|
SET optimizer_trace= 'enabled=on';
|
||||||
SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7;
|
SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7; SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) exp1, JSON_VALID(trace) exp2 FROM information_schema.optimizer_trace;
|
||||||
SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ), JSON_VALID(trace) FROM information_schema.optimizer_trace;
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
|
57
mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff
Normal file
57
mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers.rdiff
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
--- innodb-fts-ddl.result
|
||||||
|
+++ innodb-fts-ddl.reject
|
||||||
|
@@ -11,8 +11,10 @@
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
-ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
|
||||||
|
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 6
|
||||||
|
+info: Records: 6 Duplicates: 0 Warnings: 0
|
||||||
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
|
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
|
||||||
|
id title body
|
||||||
|
@@ -26,7 +28,9 @@
|
||||||
|
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 12
|
||||||
|
+info: Records: 12 Duplicates: 0 Warnings: 0
|
||||||
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
|
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
|
||||||
|
id title body
|
||||||
|
@@ -76,8 +80,10 @@
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
|
||||||
|
-ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
+ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 6
|
||||||
|
+info: Records: 6 Duplicates: 0 Warnings: 0
|
||||||
|
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
|
||||||
|
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
|
||||||
|
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT;
|
||||||
|
@@ -162,7 +168,7 @@
|
||||||
|
(20, 'MySQL Security','When configured properly, MySQL ...');
|
||||||
|
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
|
||||||
|
ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
|
||||||
|
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
|
||||||
|
ADD FULLTEXT INDEX idx3 (title);
|
||||||
|
affected rows: 6
|
||||||
|
@@ -274,7 +280,7 @@
|
||||||
|
call mtr.add_suppression("InnoDB: Failed to create");
|
||||||
|
CREATE TABLE t1(a TEXT, FTS_DOC_ID BIGINT UNSIGNED NOT NULL UNIQUE) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
|
||||||
|
-ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
|
57
mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff
Normal file
57
mysql-test/suite/innodb_fts/r/innodb-fts-ddl,vers_trx.rdiff
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
--- innodb-fts-ddl.result
|
||||||
|
+++ innodb-fts-ddl.reject
|
||||||
|
@@ -11,8 +11,10 @@
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
-ERROR 0A000: ALGORITHM=NOCOPY is not supported for this operation. Try ALGORITHM=INPLACE
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
|
||||||
|
+ERROR 0A000: ALGORITHM=NOCOPY is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 6
|
||||||
|
+info: Records: 6 Duplicates: 0 Warnings: 0
|
||||||
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
|
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
|
||||||
|
id title body
|
||||||
|
@@ -26,7 +28,9 @@
|
||||||
|
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 12
|
||||||
|
+info: Records: 12 Duplicates: 0 Warnings: 0
|
||||||
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
|
AGAINST ('Tutorial' IN NATURAL LANGUAGE MODE);
|
||||||
|
id title body
|
||||||
|
@@ -76,8 +80,10 @@
|
||||||
|
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||||
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
|
||||||
|
-ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
|
||||||
|
-ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
+ERROR 0A000: LOCK=NONE is not supported. Reason: Not implemented for system-versioned operations. Try LOCK=SHARED
|
||||||
|
+ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
+affected rows: 6
|
||||||
|
+info: Records: 6 Duplicates: 0 Warnings: 0
|
||||||
|
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
|
||||||
|
ERROR 0A000: LOCK=NONE is not supported. Reason: Fulltext index creation requires a lock. Try LOCK=SHARED
|
||||||
|
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT;
|
||||||
|
@@ -162,7 +168,7 @@
|
||||||
|
(20, 'MySQL Security','When configured properly, MySQL ...');
|
||||||
|
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
|
||||||
|
ADD FULLTEXT INDEX idx3 (title), ALGORITHM=INPLACE;
|
||||||
|
-ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: InnoDB presently supports one FULLTEXT index creation at a time. Try ALGORITHM=COPY
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
ALTER TABLE articles ADD FULLTEXT INDEX idx (title),
|
||||||
|
ADD FULLTEXT INDEX idx3 (title);
|
||||||
|
affected rows: 6
|
||||||
|
@@ -274,7 +280,7 @@
|
||||||
|
call mtr.add_suppression("InnoDB: Failed to create");
|
||||||
|
CREATE TABLE t1(a TEXT, FTS_DOC_ID BIGINT UNSIGNED NOT NULL UNIQUE) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
|
||||||
|
-ERROR HY000: Got error 11 "Resource temporarily unavailable" from storage engine InnoDB
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
DROP TABLE t1;
|
||||||
|
CREATE TABLE t1 (a VARCHAR(3)) ENGINE=InnoDB;
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT KEY(a), ADD COLUMN b VARCHAR(3), ADD FULLTEXT KEY(b);
|
10
mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff
Normal file
10
mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers.rdiff
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- innodb-fts-fic.result
|
||||||
|
+++ innodb-fts-fic.reject
|
||||||
|
@@ -172,7 +172,6 @@
|
||||||
|
(1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
|
||||||
|
(2, 'How To Use MySQL Well','After you went through a ...');
|
||||||
|
CREATE FULLTEXT INDEX idx ON wp(title, text);
|
||||||
|
-ERROR HY000: Column 'FTS_DOC_ID' is of wrong type for an InnoDB FULLTEXT index
|
||||||
|
DROP TABLE wp;
|
||||||
|
CREATE TABLE wp(
|
||||||
|
FTS_DOC_ID bigint unsigned PRIMARY KEY,
|
10
mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff
Normal file
10
mysql-test/suite/innodb_fts/r/innodb-fts-fic,vers_trx.rdiff
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--- innodb-fts-fic.result
|
||||||
|
+++ innodb-fts-fic.reject
|
||||||
|
@@ -172,7 +172,6 @@
|
||||||
|
(1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
|
||||||
|
(2, 'How To Use MySQL Well','After you went through a ...');
|
||||||
|
CREATE FULLTEXT INDEX idx ON wp(title, text);
|
||||||
|
-ERROR HY000: Column 'FTS_DOC_ID' is of wrong type for an InnoDB FULLTEXT index
|
||||||
|
DROP TABLE wp;
|
||||||
|
CREATE TABLE wp(
|
||||||
|
FTS_DOC_ID bigint unsigned PRIMARY KEY,
|
53
mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff
Normal file
53
mysql-test/suite/innodb_fts/r/misc_debug,vers.rdiff
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
--- misc_debug.result
|
||||||
|
+++ misc_debug.reject
|
||||||
|
@@ -7,14 +7,14 @@
|
||||||
|
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
||||||
|
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
|
||||||
|
CREATE FULLTEXT INDEX idx ON articles(body);
|
||||||
|
-ERROR HY000: Out of memory.
|
||||||
|
+ERROR HY000: Can't create table `test`.`articles` (errno: 128 "Out of memory in engine")
|
||||||
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
|
||||||
|
DROP TABLE articles;
|
||||||
|
CREATE TABLE t (a INT, b TEXT) engine=innodb;
|
||||||
|
SET debug_dbug='+d,alter_table_rollback_new_index';
|
||||||
|
-ALTER TABLE t ADD FULLTEXT INDEX (b(64));
|
||||||
|
-ERROR HY000: Unknown error
|
||||||
|
+ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
|
||||||
|
@@ -27,32 +27,6 @@
|
||||||
|
ALTER TABLE t1 FORCE;
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
#
|
||||||
|
-# MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
|
||||||
|
-#
|
||||||
|
-CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
|
||||||
|
-INSERT INTO t1 VALUES(1, "test", "test_1");
|
||||||
|
-connect con1,localhost,root,,test;
|
||||||
|
-SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
|
||||||
|
-SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
|
||||||
|
-ALTER TABLE t1 ADD FULLTEXT(c);
|
||||||
|
-connection default;
|
||||||
|
-SET DEBUG_SYNC='now WAIT_FOR s2';
|
||||||
|
-START TRANSACTION;
|
||||||
|
-SELECT * FROM t1;
|
||||||
|
-a b c
|
||||||
|
-1 test test_1
|
||||||
|
-SET DEBUG_SYNC='now SIGNAL g2';
|
||||||
|
-connection con1;
|
||||||
|
-ERROR HY000: Out of memory.
|
||||||
|
-disconnect con1;
|
||||||
|
-connection default;
|
||||||
|
-SET DEBUG_SYNC=RESET;
|
||||||
|
-ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
|
||||||
|
-CHECK TABLE t1;
|
||||||
|
-Table Op Msg_type Msg_text
|
||||||
|
-test.t1 check status OK
|
||||||
|
-DROP TABLE t1;
|
||||||
|
-#
|
||||||
|
# MDEV-25663 Double free of transaction during TRUNCATE
|
||||||
|
#
|
||||||
|
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
|
53
mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff
Normal file
53
mysql-test/suite/innodb_fts/r/misc_debug,vers_trx.rdiff
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
--- misc_debug.result
|
||||||
|
+++ misc_debug.reject
|
||||||
|
@@ -7,14 +7,14 @@
|
||||||
|
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
||||||
|
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
|
||||||
|
CREATE FULLTEXT INDEX idx ON articles(body);
|
||||||
|
-ERROR HY000: Out of memory.
|
||||||
|
+ERROR HY000: Can't create table `test`.`articles` (errno: 128 "Out of memory in engine")
|
||||||
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
ALTER TABLE articles STATS_PERSISTENT=DEFAULT;
|
||||||
|
DROP TABLE articles;
|
||||||
|
CREATE TABLE t (a INT, b TEXT) engine=innodb;
|
||||||
|
SET debug_dbug='+d,alter_table_rollback_new_index';
|
||||||
|
-ALTER TABLE t ADD FULLTEXT INDEX (b(64));
|
||||||
|
-ERROR HY000: Unknown error
|
||||||
|
+ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
|
||||||
|
+ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Not implemented for system-versioned operations. Try ALGORITHM=COPY
|
||||||
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
DROP TABLE t;
|
||||||
|
CREATE TABLE t1 (pk INT, a VARCHAR(8), PRIMARY KEY(pk),
|
||||||
|
@@ -27,32 +27,6 @@
|
||||||
|
ALTER TABLE t1 FORCE;
|
||||||
|
DROP TABLE t2, t1;
|
||||||
|
#
|
||||||
|
-# MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
|
||||||
|
-#
|
||||||
|
-CREATE TABLE t1(a INT, b TEXT, c TEXT, FULLTEXT INDEX(b)) ENGINE=InnoDB;
|
||||||
|
-INSERT INTO t1 VALUES(1, "test", "test_1");
|
||||||
|
-connect con1,localhost,root,,test;
|
||||||
|
-SET DEBUG_DBUG="+d,innodb_OOM_inplace_alter";
|
||||||
|
-SET DEBUG_SYNC='innodb_commit_inplace_alter_table_enter SIGNAL s2 WAIT_FOR g2';
|
||||||
|
-ALTER TABLE t1 ADD FULLTEXT(c);
|
||||||
|
-connection default;
|
||||||
|
-SET DEBUG_SYNC='now WAIT_FOR s2';
|
||||||
|
-START TRANSACTION;
|
||||||
|
-SELECT * FROM t1;
|
||||||
|
-a b c
|
||||||
|
-1 test test_1
|
||||||
|
-SET DEBUG_SYNC='now SIGNAL g2';
|
||||||
|
-connection con1;
|
||||||
|
-ERROR HY000: Out of memory.
|
||||||
|
-disconnect con1;
|
||||||
|
-connection default;
|
||||||
|
-SET DEBUG_SYNC=RESET;
|
||||||
|
-ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
|
||||||
|
-CHECK TABLE t1;
|
||||||
|
-Table Op Msg_type Msg_text
|
||||||
|
-test.t1 check status OK
|
||||||
|
-DROP TABLE t1;
|
||||||
|
-#
|
||||||
|
# MDEV-25663 Double free of transaction during TRUNCATE
|
||||||
|
#
|
||||||
|
call mtr.add_suppression("InnoDB: \\(Too many concurrent transactions\\)");
|
12
mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff
Normal file
12
mysql-test/suite/innodb_fts/r/sync_ddl,vers.rdiff
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- sync_ddl.result
|
||||||
|
+++ sync_ddl.reject
|
||||||
|
@@ -100,7 +100,7 @@
|
||||||
|
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
DROP INDEX idx1,
|
||||||
|
ADD FULLTEXT INDEX idx2(value);
|
||||||
|
-affected rows: 0
|
||||||
|
-info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
|
+affected rows: 2
|
||||||
|
+info: Records: 2 Duplicates: 0 Warnings: 0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL debug_dbug = @save_debug;
|
12
mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff
Normal file
12
mysql-test/suite/innodb_fts/r/sync_ddl,vers_trx.rdiff
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
--- sync_ddl.result
|
||||||
|
+++ sync_ddl.reject
|
||||||
|
@@ -100,7 +100,7 @@
|
||||||
|
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
DROP INDEX idx1,
|
||||||
|
ADD FULLTEXT INDEX idx2(value);
|
||||||
|
-affected rows: 0
|
||||||
|
-info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
|
+affected rows: 2
|
||||||
|
+info: Records: 2 Duplicates: 0 Warnings: 0
|
||||||
|
DROP TABLE t1;
|
||||||
|
SET GLOBAL debug_dbug = @save_debug;
|
@ -99,7 +99,8 @@ ALTER TABLE t1
|
|||||||
DROP COLUMN id1,
|
DROP COLUMN id1,
|
||||||
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
DROP INDEX idx1,
|
DROP INDEX idx1,
|
||||||
ADD FULLTEXT INDEX idx2(value),
|
ADD FULLTEXT INDEX idx2(value);
|
||||||
ALGORITHM=INPLACE;
|
affected rows: 0
|
||||||
|
info: Records: 0 Duplicates: 0 Warnings: 0
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
SET GLOBAL debug_dbug = @save_debug;
|
SET GLOBAL debug_dbug = @save_debug;
|
||||||
|
@ -20,11 +20,20 @@ INSERT INTO fts_test (title,body) VALUES
|
|||||||
('MySQL Security','When configured properly, MySQL ...');
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
|
||||||
# Table does rebuild when fts index builds for the first time
|
# Table does rebuild when fts index builds for the first time
|
||||||
|
# Create the FTS index
|
||||||
|
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED
|
||||||
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
|
||||||
# Create the FTS index
|
|
||||||
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=INPLACE;
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
--disable_info
|
||||||
|
}
|
||||||
|
|
||||||
# Select word "tutorial" in the table
|
# Select word "tutorial" in the table
|
||||||
SELECT * FROM fts_test WHERE MATCH (title, body)
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
@ -43,7 +52,14 @@ INSERT INTO fts_test (title,body) VALUES
|
|||||||
('MySQL Security','When configured properly, MySQL ...');
|
('MySQL Security','When configured properly, MySQL ...');
|
||||||
|
|
||||||
# FTS_DOC_ID hidden column and FTS_DOC_ID index exist
|
# FTS_DOC_ID hidden column and FTS_DOC_ID index exist
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
--disable_info
|
||||||
|
}
|
||||||
|
|
||||||
# Select word "tutorial" in the table
|
# Select word "tutorial" in the table
|
||||||
SELECT * FROM fts_test WHERE MATCH (title, body)
|
SELECT * FROM fts_test WHERE MATCH (title, body)
|
||||||
@ -112,7 +128,14 @@ INSERT INTO fts_test (title,body) VALUES
|
|||||||
# column already exists. This has not been implemented yet.
|
# column already exists. This has not been implemented yet.
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
|
CREATE FULLTEXT INDEX idx on fts_test (title, body) LOCK=NONE;
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body), ALGORITHM=NOCOPY;
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
|
||||||
|
--disable_info
|
||||||
|
}
|
||||||
|
|
||||||
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
|
ALTER TABLE fts_test ROW_FORMAT=REDUNDANT, LOCK=NONE;
|
||||||
@ -349,8 +372,14 @@ let $fts_aux_file= `select concat('FTS_',right(concat(repeat('0',16), lower(hex(
|
|||||||
write_file $MYSQLD_DATADIR/test/$fts_aux_file;
|
write_file $MYSQLD_DATADIR/test/$fts_aux_file;
|
||||||
EOF
|
EOF
|
||||||
--replace_regex /".*" from/"Resource temporarily unavailable" from/
|
--replace_regex /".*" from/"Resource temporarily unavailable" from/
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
--error ER_GET_ERRNO
|
--error ER_GET_ERRNO
|
||||||
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
|
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
|
ALTER TABLE t1 ADD FULLTEXT(a), ALGORITHM=INPLACE;
|
||||||
|
}
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
remove_file $MYSQLD_DATADIR/test/$fts_aux_file;
|
remove_file $MYSQLD_DATADIR/test/$fts_aux_file;
|
||||||
|
|
||||||
|
@ -211,8 +211,13 @@ INSERT INTO wp (FTS_DOC_ID, title, text) VALUES
|
|||||||
(1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
|
(1, 'MySQL Tutorial','DBMS stands for DataBase ...'),
|
||||||
(2, 'How To Use MySQL Well','After you went through a ...');
|
(2, 'How To Use MySQL Well','After you went through a ...');
|
||||||
|
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
--error ER_INNODB_FT_WRONG_DOCID_COLUMN
|
--error ER_INNODB_FT_WRONG_DOCID_COLUMN
|
||||||
CREATE FULLTEXT INDEX idx ON wp(title, text);
|
CREATE FULLTEXT INDEX idx ON wp(title, text);
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
CREATE FULLTEXT INDEX idx ON wp(title, text);
|
||||||
|
}
|
||||||
|
|
||||||
DROP TABLE wp;
|
DROP TABLE wp;
|
||||||
CREATE TABLE wp(
|
CREATE TABLE wp(
|
||||||
|
@ -23,8 +23,14 @@ CREATE TABLE articles (
|
|||||||
# The newly create dict_index_t should be removed from fts cache
|
# The newly create dict_index_t should be removed from fts cache
|
||||||
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
SET @saved_debug_dbug = @@SESSION.debug_dbug;
|
||||||
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
|
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
--error ER_OUT_OF_RESOURCES
|
--error ER_OUT_OF_RESOURCES
|
||||||
CREATE FULLTEXT INDEX idx ON articles(body);
|
CREATE FULLTEXT INDEX idx ON articles(body);
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
--error ER_CANT_CREATE_TABLE
|
||||||
|
CREATE FULLTEXT INDEX idx ON articles(body);
|
||||||
|
}
|
||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
|
||||||
# This simply go through ha_innobase::commit_inplace_alter_table
|
# This simply go through ha_innobase::commit_inplace_alter_table
|
||||||
@ -37,8 +43,14 @@ DROP TABLE articles;
|
|||||||
|
|
||||||
CREATE TABLE t (a INT, b TEXT) engine=innodb;
|
CREATE TABLE t (a INT, b TEXT) engine=innodb;
|
||||||
SET debug_dbug='+d,alter_table_rollback_new_index';
|
SET debug_dbug='+d,alter_table_rollback_new_index';
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
-- error ER_UNKNOWN_ERROR
|
-- error ER_UNKNOWN_ERROR
|
||||||
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
|
ALTER TABLE t ADD FULLTEXT INDEX (b(64));
|
||||||
|
}
|
||||||
|
if (!$MTR_COMBINATION_ORIG) {
|
||||||
|
-- error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
|
||||||
|
ALTER TABLE t ADD FULLTEXT INDEX (b(64)), ALGORITHM=INPLACE;
|
||||||
|
}
|
||||||
SET SESSION debug_dbug=@saved_debug_dbug;
|
SET SESSION debug_dbug=@saved_debug_dbug;
|
||||||
|
|
||||||
DROP TABLE t;
|
DROP TABLE t;
|
||||||
@ -56,6 +68,7 @@ ALTER TABLE t1 FORCE;
|
|||||||
# Cleanup
|
# Cleanup
|
||||||
DROP TABLE t2, t1;
|
DROP TABLE t2, t1;
|
||||||
|
|
||||||
|
if ($MTR_COMBINATION_ORIG) {
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
|
--echo # MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
|
||||||
--echo #
|
--echo #
|
||||||
@ -81,6 +94,7 @@ ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
|
|||||||
CHECK TABLE t1;
|
CHECK TABLE t1;
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
--source include/wait_until_count_sessions.inc
|
--source include/wait_until_count_sessions.inc
|
||||||
|
}
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-25663 Double free of transaction during TRUNCATE
|
--echo # MDEV-25663 Double free of transaction during TRUNCATE
|
||||||
|
@ -182,12 +182,13 @@ INSERT INTO t1 (value) VALUES
|
|||||||
('collation of latin1_bin to make it case sensitive')
|
('collation of latin1_bin to make it case sensitive')
|
||||||
;
|
;
|
||||||
|
|
||||||
|
--enable_info
|
||||||
ALTER TABLE t1
|
ALTER TABLE t1
|
||||||
DROP COLUMN id1,
|
DROP COLUMN id1,
|
||||||
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||||
DROP INDEX idx1,
|
DROP INDEX idx1,
|
||||||
ADD FULLTEXT INDEX idx2(value),
|
ADD FULLTEXT INDEX idx2(value);
|
||||||
ALGORITHM=INPLACE;
|
--disable_info
|
||||||
|
|
||||||
DROP TABLE t1;
|
DROP TABLE t1;
|
||||||
|
|
||||||
|
@ -846,8 +846,17 @@ Note 1060 Duplicate column name 'v'
|
|||||||
alter table `b` add column if not exists ( p bit );
|
alter table `b` add column if not exists ( p bit );
|
||||||
drop table `b`;
|
drop table `b`;
|
||||||
#
|
#
|
||||||
# End of 10.4 tests
|
# MDEV-30528 Assertion !mbmaxlen || ... failed
|
||||||
|
# in dtype_get_at_most_n_mbchars()
|
||||||
#
|
#
|
||||||
|
CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES ('foo');
|
||||||
|
DELETE FROM t;
|
||||||
|
ALTER TABLE t ADD FULLTEXT (f);
|
||||||
|
affected rows: 1
|
||||||
|
info: Records: 1 Duplicates: 0 Warnings: 0
|
||||||
|
DROP TABLE t;
|
||||||
|
# End of 10.4 tests
|
||||||
#
|
#
|
||||||
# MDEV-21941 RENAME doesn't work for system time or period fields
|
# MDEV-21941 RENAME doesn't work for system time or period fields
|
||||||
#
|
#
|
||||||
@ -871,6 +880,4 @@ t1 CREATE TABLE `t1` (
|
|||||||
PERIOD FOR SYSTEM_TIME (`x`, `y`)
|
PERIOD FOR SYSTEM_TIME (`x`, `y`)
|
||||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
|
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
|
||||||
drop table t1;
|
drop table t1;
|
||||||
#
|
|
||||||
# End of 10.5 tests
|
# End of 10.5 tests
|
||||||
#
|
|
||||||
|
@ -741,9 +741,20 @@ alter table `b` add column if not exists ( p bit );
|
|||||||
drop table `b`;
|
drop table `b`;
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # End of 10.4 tests
|
--echo # MDEV-30528 Assertion !mbmaxlen || ... failed
|
||||||
|
--echo # in dtype_get_at_most_n_mbchars()
|
||||||
--echo #
|
--echo #
|
||||||
|
|
||||||
|
CREATE TABLE t(f TEXT) WITH SYSTEM VERSIONING CHARACTER SET utf8 ENGINE=InnoDB;
|
||||||
|
INSERT INTO t VALUES ('foo');
|
||||||
|
DELETE FROM t;
|
||||||
|
--enable_info
|
||||||
|
ALTER TABLE t ADD FULLTEXT (f);
|
||||||
|
--disable_info
|
||||||
|
DROP TABLE t;
|
||||||
|
|
||||||
|
--echo # End of 10.4 tests
|
||||||
|
|
||||||
--echo #
|
--echo #
|
||||||
--echo # MDEV-21941 RENAME doesn't work for system time or period fields
|
--echo # MDEV-21941 RENAME doesn't work for system time or period fields
|
||||||
--echo #
|
--echo #
|
||||||
@ -765,6 +776,4 @@ show create table t1;
|
|||||||
# cleanup
|
# cleanup
|
||||||
drop table t1;
|
drop table t1;
|
||||||
|
|
||||||
--echo #
|
|
||||||
--echo # End of 10.5 tests
|
--echo # End of 10.5 tests
|
||||||
--echo #
|
|
||||||
|
@ -1502,7 +1502,7 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin,
|
|||||||
else
|
else
|
||||||
ret= plugin_do_initialize(plugin, state);
|
ret= plugin_do_initialize(plugin, state);
|
||||||
|
|
||||||
if (ret)
|
if (ret && ret != HA_ERR_RETRY_INIT)
|
||||||
plugin_variables_deinit(plugin);
|
plugin_variables_deinit(plugin);
|
||||||
|
|
||||||
mysql_mutex_lock(&LOCK_plugin);
|
mysql_mutex_lock(&LOCK_plugin);
|
||||||
@ -1782,6 +1782,7 @@ int plugin_init(int *argc, char **argv, int flags)
|
|||||||
uint state= plugin_ptr->state;
|
uint state= plugin_ptr->state;
|
||||||
mysql_mutex_unlock(&LOCK_plugin);
|
mysql_mutex_unlock(&LOCK_plugin);
|
||||||
error= plugin_do_initialize(plugin_ptr, state);
|
error= plugin_do_initialize(plugin_ptr, state);
|
||||||
|
DBUG_EXECUTE_IF("fail_spider_init_retry", error= 1;);
|
||||||
mysql_mutex_lock(&LOCK_plugin);
|
mysql_mutex_lock(&LOCK_plugin);
|
||||||
plugin_ptr->state= state;
|
plugin_ptr->state= state;
|
||||||
if (error == HA_ERR_RETRY_INIT)
|
if (error == HA_ERR_RETRY_INIT)
|
||||||
|
@ -2551,6 +2551,9 @@ cannot_create_many_fulltext_index:
|
|||||||
online = false;
|
online = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static constexpr const char *not_implemented
|
||||||
|
= "Not implemented for system-versioned operations";
|
||||||
|
|
||||||
if (ha_alter_info->handler_flags
|
if (ha_alter_info->handler_flags
|
||||||
& ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) {
|
& ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) {
|
||||||
/* ADD FULLTEXT|SPATIAL INDEX requires a lock.
|
/* ADD FULLTEXT|SPATIAL INDEX requires a lock.
|
||||||
@ -2578,6 +2581,12 @@ cannot_create_many_fulltext_index:
|
|||||||
goto cannot_create_many_fulltext_index;
|
goto cannot_create_many_fulltext_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (altered_table->versioned()) {
|
||||||
|
ha_alter_info->unsupported_reason
|
||||||
|
= not_implemented;
|
||||||
|
DBUG_RETURN(HA_ALTER_INPLACE_NOT_SUPPORTED);
|
||||||
|
}
|
||||||
|
|
||||||
add_fulltext = true;
|
add_fulltext = true;
|
||||||
if (ha_alter_info->online
|
if (ha_alter_info->online
|
||||||
&& !ha_alter_info->unsupported_reason) {
|
&& !ha_alter_info->unsupported_reason) {
|
||||||
@ -2616,10 +2625,8 @@ cannot_create_many_fulltext_index:
|
|||||||
|
|
||||||
// FIXME: implement Online DDL for system-versioned operations
|
// FIXME: implement Online DDL for system-versioned operations
|
||||||
if (ha_alter_info->handler_flags & INNOBASE_ALTER_VERSIONED_REBUILD) {
|
if (ha_alter_info->handler_flags & INNOBASE_ALTER_VERSIONED_REBUILD) {
|
||||||
|
|
||||||
if (ha_alter_info->online) {
|
if (ha_alter_info->online) {
|
||||||
ha_alter_info->unsupported_reason =
|
ha_alter_info->unsupported_reason = not_implemented;
|
||||||
"Not implemented for system-versioned operations";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
online = false;
|
online = false;
|
||||||
|
@ -459,8 +459,6 @@ row_merge_buf_redundant_convert(
|
|||||||
@param[in,out] row table row
|
@param[in,out] row table row
|
||||||
@param[in] ext cache of externally stored
|
@param[in] ext cache of externally stored
|
||||||
column prefixes, or NULL
|
column prefixes, or NULL
|
||||||
@param[in] history_fts row is historical in a system-versioned table
|
|
||||||
on which a FTS_DOC_ID_INDEX(FTS_DOC_ID) exists
|
|
||||||
@param[in,out] doc_id Doc ID if we are creating
|
@param[in,out] doc_id Doc ID if we are creating
|
||||||
FTS index
|
FTS index
|
||||||
@param[in,out] conv_heap memory heap where to allocate data when
|
@param[in,out] conv_heap memory heap where to allocate data when
|
||||||
@ -482,7 +480,6 @@ row_merge_buf_add(
|
|||||||
fts_psort_t* psort_info,
|
fts_psort_t* psort_info,
|
||||||
dtuple_t* row,
|
dtuple_t* row,
|
||||||
const row_ext_t* ext,
|
const row_ext_t* ext,
|
||||||
const bool history_fts,
|
|
||||||
doc_id_t* doc_id,
|
doc_id_t* doc_id,
|
||||||
mem_heap_t* conv_heap,
|
mem_heap_t* conv_heap,
|
||||||
dberr_t* err,
|
dberr_t* err,
|
||||||
@ -545,7 +542,7 @@ error:
|
|||||||
: NULL;
|
: NULL;
|
||||||
|
|
||||||
/* Process the Doc ID column */
|
/* Process the Doc ID column */
|
||||||
if (!v_col && (history_fts || *doc_id)
|
if (!v_col && *doc_id
|
||||||
&& col->ind == index->table->fts->doc_col) {
|
&& col->ind == index->table->fts->doc_col) {
|
||||||
fts_write_doc_id((byte*) &write_doc_id, *doc_id);
|
fts_write_doc_id((byte*) &write_doc_id, *doc_id);
|
||||||
|
|
||||||
@ -597,7 +594,7 @@ error:
|
|||||||
|
|
||||||
|
|
||||||
/* Tokenize and process data for FTS */
|
/* Tokenize and process data for FTS */
|
||||||
if (!history_fts && (index->type & DICT_FTS)) {
|
if (index->type & DICT_FTS) {
|
||||||
fts_doc_item_t* doc_item;
|
fts_doc_item_t* doc_item;
|
||||||
byte* value;
|
byte* value;
|
||||||
void* ptr;
|
void* ptr;
|
||||||
@ -1701,6 +1698,7 @@ row_merge_read_clustered_index(
|
|||||||
DBUG_ENTER("row_merge_read_clustered_index");
|
DBUG_ENTER("row_merge_read_clustered_index");
|
||||||
|
|
||||||
ut_ad((old_table == new_table) == !col_map);
|
ut_ad((old_table == new_table) == !col_map);
|
||||||
|
ut_ad(old_table->fts || !new_table->fts || !new_table->versioned());
|
||||||
ut_ad(!defaults || col_map);
|
ut_ad(!defaults || col_map);
|
||||||
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
|
ut_ad(trx_state_eq(trx, TRX_STATE_ACTIVE));
|
||||||
ut_ad(trx->id);
|
ut_ad(trx->id);
|
||||||
@ -1888,7 +1886,6 @@ row_merge_read_clustered_index(
|
|||||||
dtuple_t* row;
|
dtuple_t* row;
|
||||||
row_ext_t* ext;
|
row_ext_t* ext;
|
||||||
page_cur_t* cur = btr_pcur_get_page_cur(&pcur);
|
page_cur_t* cur = btr_pcur_get_page_cur(&pcur);
|
||||||
bool history_row, history_fts = false;
|
|
||||||
|
|
||||||
page_cur_move_to_next(cur);
|
page_cur_move_to_next(cur);
|
||||||
|
|
||||||
@ -2124,11 +2121,6 @@ end_of_index:
|
|||||||
row_heap);
|
row_heap);
|
||||||
ut_ad(row);
|
ut_ad(row);
|
||||||
|
|
||||||
history_row = new_table->versioned()
|
|
||||||
&& dtuple_get_nth_field(row, new_table->vers_end)
|
|
||||||
->vers_history_row();
|
|
||||||
history_fts = history_row && new_table->fts;
|
|
||||||
|
|
||||||
for (ulint i = 0; i < n_nonnull; i++) {
|
for (ulint i = 0; i < n_nonnull; i++) {
|
||||||
dfield_t* field = &row->fields[nonnull[i]];
|
dfield_t* field = &row->fields[nonnull[i]];
|
||||||
|
|
||||||
@ -2158,7 +2150,7 @@ end_of_index:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get the next Doc ID */
|
/* Get the next Doc ID */
|
||||||
if (add_doc_id && !history_fts) {
|
if (add_doc_id) {
|
||||||
doc_id++;
|
doc_id++;
|
||||||
} else {
|
} else {
|
||||||
doc_id = 0;
|
doc_id = 0;
|
||||||
@ -2198,7 +2190,9 @@ end_of_index:
|
|||||||
add_autoinc);
|
add_autoinc);
|
||||||
|
|
||||||
if (new_table->versioned()) {
|
if (new_table->versioned()) {
|
||||||
if (history_row) {
|
if (dtuple_get_nth_field(row,
|
||||||
|
new_table->vers_end)
|
||||||
|
->vers_history_row()) {
|
||||||
if (dfield_get_type(dfield)->prtype & DATA_NOT_NULL) {
|
if (dfield_get_type(dfield)->prtype & DATA_NOT_NULL) {
|
||||||
err = DB_UNSUPPORTED;
|
err = DB_UNSUPPORTED;
|
||||||
my_error(ER_UNSUPPORTED_EXTENSION, MYF(0),
|
my_error(ER_UNSUPPORTED_EXTENSION, MYF(0),
|
||||||
@ -2317,7 +2311,7 @@ write_buffers:
|
|||||||
if (UNIV_LIKELY
|
if (UNIV_LIKELY
|
||||||
(row && (rows_added = row_merge_buf_add(
|
(row && (rows_added = row_merge_buf_add(
|
||||||
buf, fts_index, old_table, new_table,
|
buf, fts_index, old_table, new_table,
|
||||||
psort_info, row, ext, history_fts,
|
psort_info, row, ext,
|
||||||
&doc_id, conv_heap, &err,
|
&doc_id, conv_heap, &err,
|
||||||
&v_heap, eval_table, trx)))) {
|
&v_heap, eval_table, trx)))) {
|
||||||
|
|
||||||
@ -2642,7 +2636,7 @@ write_buffers:
|
|||||||
(!(rows_added = row_merge_buf_add(
|
(!(rows_added = row_merge_buf_add(
|
||||||
buf, fts_index, old_table,
|
buf, fts_index, old_table,
|
||||||
new_table, psort_info,
|
new_table, psort_info,
|
||||||
row, ext, history_fts, &doc_id,
|
row, ext, &doc_id,
|
||||||
conv_heap, &err, &v_heap,
|
conv_heap, &err, &v_heap,
|
||||||
eval_table, trx)))) {
|
eval_table, trx)))) {
|
||||||
/* An empty buffer should have enough
|
/* An empty buffer should have enough
|
||||||
|
@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# MDEV-33441 No spider variables available is Spider is loaded upon server startup
|
||||||
|
#
|
||||||
|
set spider_same_server_link=0;
|
||||||
|
#
|
||||||
|
# end of test mdev_33441
|
||||||
|
#
|
@ -0,0 +1,10 @@
|
|||||||
|
#
|
||||||
|
# MDEV-33441 No spider variables available is Spider is loaded upon server startup
|
||||||
|
#
|
||||||
|
select * from mysql.plugin;
|
||||||
|
name dl
|
||||||
|
show variables like 'spider%';
|
||||||
|
Variable_name Value
|
||||||
|
#
|
||||||
|
# end of test mdev_33441_fail
|
||||||
|
#
|
1
storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt
Normal file
1
storage/spider/mysql-test/spider/bugfix/t/mdev_33441.opt
Normal file
@ -0,0 +1 @@
|
|||||||
|
--plugin-load-add=ha_spider
|
10
storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test
Normal file
10
storage/spider/mysql-test/spider/bugfix/t/mdev_33441.test
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
--echo #
|
||||||
|
--echo # MDEV-33441 No spider variables available is Spider is loaded upon server startup
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
# We test that at least one spider variable exists.
|
||||||
|
set spider_same_server_link=0;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # end of test mdev_33441
|
||||||
|
--echo #
|
@ -0,0 +1,2 @@
|
|||||||
|
--plugin-load-add=ha_spider
|
||||||
|
--debug-dbug=d,fail_spider_init_retry
|
@ -0,0 +1,10 @@
|
|||||||
|
--source include/have_debug.inc
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-33441 No spider variables available is Spider is loaded upon server startup
|
||||||
|
--echo #
|
||||||
|
# We test that when retry fails, spider variables are deleted.
|
||||||
|
select * from mysql.plugin;
|
||||||
|
show variables like 'spider%';
|
||||||
|
--echo #
|
||||||
|
--echo # end of test mdev_33441_fail
|
||||||
|
--echo #
|
Reference in New Issue
Block a user