Commit b770633e authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.4 into 10.5

parents 68d9deb6 ae709b64
Subproject commit 3b3c175af0e993ffaae251871421e206cc41963f
Subproject commit 66596ad9e1d7efa8479656872cf09c9c1870a02e
Subproject commit ae565eea90dd3053a5a7857e7cdad93342dbc645
Subproject commit 9155b19b462ac15fc69d0b58ae51370b7523ced5
......@@ -9037,8 +9037,8 @@ SELECT b, a FROM t1 WHERE b <> 'p' OR a = 4 GROUP BY b, a HAVING a <= 7;
b a
h 1
n 4
SELECT json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ), JSON_VALID(trace) FROM information_schema.optimizer_trace;
json_detailed(json_extract(trace, '$**.steps[*].join_optimization.steps[*].condition_pushdown_from_having') ) JSON_VALID(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;
exp1 exp2
[
{
"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;
INSERT INTO t1 VALUES (4,'n'),(1,'h'),(NULL,'w');
SET optimizer_trace= 'enabled=on';
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') ), JSON_VALID(trace) FROM information_schema.optimizer_trace;
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;
DROP TABLE t1;
--echo #
......
--- 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);
--- 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);
--- 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,
--- 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,
--- 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\\)");
--- 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\\)");
--- 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;
--- 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,
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
DROP INDEX idx1,
ADD FULLTEXT INDEX idx2(value),
ALGORITHM=INPLACE;
ADD FULLTEXT INDEX idx2(value);
affected rows: 0
info: Records: 0 Duplicates: 0 Warnings: 0
DROP TABLE t1;
SET GLOBAL debug_dbug = @save_debug;
......@@ -20,11 +20,20 @@ INSERT INTO fts_test (title,body) VALUES
('MySQL Security','When configured properly, MySQL ...');
# 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
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;
}
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 * FROM fts_test WHERE MATCH (title, body)
......@@ -43,7 +52,14 @@ INSERT INTO fts_test (title,body) VALUES
('MySQL Security','When configured properly, MySQL ...');
# 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;
}
if (!$MTR_COMBINATION_ORIG) {
--enable_info
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
--disable_info
}
# Select word "tutorial" in the table
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.
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
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;
}
if (!$MTR_COMBINATION_ORIG) {
--enable_info
ALTER TABLE fts_test ADD FULLTEXT `idx` (title, body);
--disable_info
}
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
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;
EOF
--replace_regex /".*" from/"Resource temporarily unavailable" from/
if ($MTR_COMBINATION_ORIG) {
--error ER_GET_ERRNO
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;
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 ...'),
(2, 'How To Use MySQL Well','After you went through a ...');
if ($MTR_COMBINATION_ORIG) {
--error ER_INNODB_FT_WRONG_DOCID_COLUMN
CREATE FULLTEXT INDEX idx ON wp(title, text);
}
if (!$MTR_COMBINATION_ORIG) {
CREATE FULLTEXT INDEX idx ON wp(title, text);
}
DROP TABLE wp;
CREATE TABLE wp(
......
......@@ -23,8 +23,14 @@ CREATE TABLE articles (
# The newly create dict_index_t should be removed from fts cache
SET @saved_debug_dbug = @@SESSION.debug_dbug;
SET SESSION debug_dbug="+d,ib_dict_create_index_tree_fail";
if ($MTR_COMBINATION_ORIG) {
--error ER_OUT_OF_RESOURCES
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;
# 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;
SET debug_dbug='+d,alter_table_rollback_new_index';
if ($MTR_COMBINATION_ORIG) {
-- error ER_UNKNOWN_ERROR
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;
DROP TABLE t;
......@@ -56,6 +68,7 @@ ALTER TABLE t1 FORCE;
# Cleanup
DROP TABLE t2, t1;
if ($MTR_COMBINATION_ORIG) {
--echo #
--echo # MDEV-25200 Index count mismatch due to aborted FULLTEXT INDEX
--echo #
......@@ -81,6 +94,7 @@ ALTER TABLE t1 ADD bl INT AS (LENGTH(b)) VIRTUAL;
CHECK TABLE t1;
DROP TABLE t1;
--source include/wait_until_count_sessions.inc
}
--echo #
--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')
;
--enable_info
ALTER TABLE t1
DROP COLUMN id1,
ADD COLUMN id2 INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
DROP INDEX idx1,
ADD FULLTEXT INDEX idx2(value),
ALGORITHM=INPLACE;
ADD FULLTEXT INDEX idx2(value);
--disable_info
DROP TABLE t1;
......
......@@ -846,8 +846,17 @@ Note 1060 Duplicate column name 'v'
alter table `b` add column if not exists ( p bit );
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
#
......@@ -871,6 +880,4 @@ t1 CREATE TABLE `t1` (
PERIOD FOR SYSTEM_TIME (`x`, `y`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci WITH SYSTEM VERSIONING
drop table t1;
#
# End of 10.5 tests
#
......@@ -741,9 +741,20 @@ alter table `b` add column if not exists ( p bit );
drop table `b`;
--echo #
--echo # End of 10.4 tests
--echo # MDEV-30528 Assertion !mbmaxlen || ... failed
--echo # in dtype_get_at_most_n_mbchars()
--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 # MDEV-21941 RENAME doesn't work for system time or period fields
--echo #
......@@ -765,6 +776,4 @@ show create table t1;
# cleanup
drop table t1;
--echo #
--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
ret= plugin_do_initialize(plugin, state);
if (ret)
if (ret && ret != HA_ERR_RETRY_INIT)
plugin_variables_deinit(plugin);
mysql_mutex_lock(&LOCK_plugin);
......@@ -1782,6 +1782,7 @@ int plugin_init(int *argc, char **argv, int flags)
uint state= plugin_ptr->state;
mysql_mutex_unlock(&LOCK_plugin);
error= plugin_do_initialize(plugin_ptr, state);
DBUG_EXECUTE_IF("fail_spider_init_retry", error= 1;);
mysql_mutex_lock(&LOCK_plugin);
plugin_ptr->state= state;
if (error == HA_ERR_RETRY_INIT)
......
......@@ -2551,6 +2551,9 @@ ha_innobase::check_if_supported_inplace_alter(
online = false;
}
static constexpr const char *not_implemented
= "Not implemented for system-versioned operations";
if (ha_alter_info->handler_flags
& ALTER_ADD_NON_UNIQUE_NON_PRIM_INDEX) {
/* ADD FULLTEXT|SPATIAL INDEX requires a lock.
......@@ -2578,6 +2581,12 @@ ha_innobase::check_if_supported_inplace_alter(
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;
if (ha_alter_info->online
&& !ha_alter_info->unsupported_reason) {
......@@ -2616,10 +2625,8 @@ ha_innobase::check_if_supported_inplace_alter(
// FIXME: implement Online DDL for system-versioned operations
if (ha_alter_info->handler_flags & INNOBASE_ALTER_VERSIONED_REBUILD) {
if (ha_alter_info->online) {
ha_alter_info->unsupported_reason =
"Not implemented for system-versioned operations";
ha_alter_info->unsupported_reason = not_implemented;
}
online = false;
......
......@@ -459,8 +459,6 @@ row_merge_buf_redundant_convert(
@param[in,out] row table row
@param[in] ext cache of externally stored
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
FTS index
@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,
dtuple_t* row,
const row_ext_t* ext,
const bool history_fts,
doc_id_t* doc_id,
mem_heap_t* conv_heap,
dberr_t* err,
......@@ -545,7 +542,7 @@ row_merge_buf_add(
: NULL;
/* Process the Doc ID column */
if (!v_col && (history_fts || *doc_id)
if (!v_col && *doc_id
&& col->ind == index->table->fts->doc_col) {
fts_write_doc_id((byte*) &write_doc_id, *doc_id);
......@@ -597,7 +594,7 @@ row_merge_buf_add(
/* Tokenize and process data for FTS */
if (!history_fts && (index->type & DICT_FTS)) {
if (index->type & DICT_FTS) {
fts_doc_item_t* doc_item;
byte* value;
void* ptr;
......@@ -1701,6 +1698,7 @@ row_merge_read_clustered_index(
DBUG_ENTER("row_merge_read_clustered_index");
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(trx_state_eq(trx, TRX_STATE_ACTIVE));
ut_ad(trx->id);
......@@ -1888,7 +1886,6 @@ row_merge_read_clustered_index(
dtuple_t* row;
row_ext_t* ext;
page_cur_t* cur = btr_pcur_get_page_cur(&pcur);
bool history_row, history_fts = false;
page_cur_move_to_next(cur);
......@@ -2124,11 +2121,6 @@ row_merge_read_clustered_index(
row_heap);
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++) {
dfield_t* field = &row->fields[nonnull[i]];
......@@ -2158,7 +2150,7 @@ row_merge_read_clustered_index(
}
/* Get the next Doc ID */
if (add_doc_id && !history_fts) {
if (add_doc_id) {
doc_id++;
} else {
doc_id = 0;
......@@ -2198,7 +2190,9 @@ row_merge_read_clustered_index(
add_autoinc);
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) {
err = DB_UNSUPPORTED;
my_error(ER_UNSUPPORTED_EXTENSION, MYF(0),
......@@ -2317,7 +2311,7 @@ row_merge_read_clustered_index(
if (UNIV_LIKELY
(row && (rows_added = row_merge_buf_add(
buf, fts_index, old_table, new_table,
psort_info, row, ext, history_fts,
psort_info, row, ext,
&doc_id, conv_heap, &err,
&v_heap, eval_table, trx)))) {
......@@ -2642,7 +2636,7 @@ row_merge_read_clustered_index(
(!(rows_added = row_merge_buf_add(
buf, fts_index, old_table,
new_table, psort_info,
row, ext, history_fts, &doc_id,
row, ext, &doc_id,
conv_heap, &err, &v_heap,
eval_table, trx)))) {
/* An empty buffer should have enough
......
#
# MDEV-33441 No spider variables available is Spider is loaded upon server startup
#
set spider_same_server_link=0;
#
# end of test mdev_33441
#
#
# 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
#
--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 #
--plugin-load-add=ha_spider
--debug-dbug=d,fail_spider_init_retry
--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 #
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment