Bug #27041445 SERVER ABORTS IF FTS_DOC_ID EXCEEDS FTS_DOC_ID_MAX_STEP
Problem: ======= Multiple insert statement in table contains FULLTEXT KEY and a FTS_DOC_ID column aborts the server if the FTS_DOC_ID exceeds FTS_DOC_ID_MAX_STEP. Solution: ======== Remove the exception for first committed insert statement. Reviewed-by: Jimmy Yang<jimmy.yang@oracle.com> RB: 18023
This commit is contained in:
parent
c70fc6b16a
commit
9c03ba8f0d
@ -257,3 +257,37 @@ WHERE MATCH (title,body)
|
|||||||
AGAINST ('"more test proximity"' IN BOOLEAN MODE);
|
AGAINST ('"more test proximity"' IN BOOLEAN MODE);
|
||||||
id title body
|
id title body
|
||||||
drop table articles;
|
drop table articles;
|
||||||
|
#
|
||||||
|
# Bug #22679185 INVALID INNODB FTS DOC ID DURING INSERT
|
||||||
|
#
|
||||||
|
create table t1 (f1 int not null primary key, f2 varchar(100),
|
||||||
|
FTS_DOC_ID bigint(20) unsigned not null,
|
||||||
|
unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
|
||||||
|
fulltext key (f2))engine=innodb;
|
||||||
|
insert into t1 values(1, "This is the first record", 20000);
|
||||||
|
insert into t1 values(2, "This is the second record", 40000);
|
||||||
|
select FTS_DOC_ID from t1;
|
||||||
|
FTS_DOC_ID
|
||||||
|
20000
|
||||||
|
40000
|
||||||
|
drop table t1;
|
||||||
|
create table t1 (f1 int not null primary key, f2 varchar(100),
|
||||||
|
FTS_DOC_ID bigint(20) unsigned not null auto_increment,
|
||||||
|
unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
|
||||||
|
fulltext key (f2))engine=innodb;
|
||||||
|
set auto_increment_increment = 65535;
|
||||||
|
insert into t1(f1, f2) values(1, "This is the first record");
|
||||||
|
insert into t1(f1, f2) values(2, "This is the second record");
|
||||||
|
insert into t1(f1, f2) values(3, "This is the third record");
|
||||||
|
select FTS_DOC_ID from t1;
|
||||||
|
FTS_DOC_ID
|
||||||
|
1
|
||||||
|
65536
|
||||||
|
131071
|
||||||
|
drop table t1;
|
||||||
|
call mtr.add_suppression("\\[ERROR\\] InnoDB: Doc ID 20030101000000 is too big. Its difference with largest used Doc ID 0 cannot exceed or equal to 65535");
|
||||||
|
CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||||
|
title VARCHAR(200), FULLTEXT(title)) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t1 VALUES (NULL, NULL), (20030101000000, 20030102000000);
|
||||||
|
ERROR HY000: Invalid InnoDB FTS Doc ID
|
||||||
|
DROP TABLE t1;
|
@ -2,11 +2,6 @@
|
|||||||
|
|
||||||
-- source include/have_innodb.inc
|
-- source include/have_innodb.inc
|
||||||
|
|
||||||
if (`select plugin_auth_version <= "5.6.10" from information_schema.plugins where plugin_name='innodb'`)
|
|
||||||
{
|
|
||||||
--skip Not fixed in InnoDB 5.6.10 or earlier
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create FTS table
|
# Create FTS table
|
||||||
CREATE TABLE articles (
|
CREATE TABLE articles (
|
||||||
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||||
@ -226,3 +221,37 @@ SELECT * FROM articles
|
|||||||
AGAINST ('"more test proximity"' IN BOOLEAN MODE);
|
AGAINST ('"more test proximity"' IN BOOLEAN MODE);
|
||||||
|
|
||||||
drop table articles;
|
drop table articles;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # Bug #22679185 INVALID INNODB FTS DOC ID DURING INSERT
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
create table t1 (f1 int not null primary key, f2 varchar(100),
|
||||||
|
FTS_DOC_ID bigint(20) unsigned not null,
|
||||||
|
unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
|
||||||
|
fulltext key (f2))engine=innodb;
|
||||||
|
|
||||||
|
insert into t1 values(1, "This is the first record", 20000);
|
||||||
|
insert into t1 values(2, "This is the second record", 40000);
|
||||||
|
select FTS_DOC_ID from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
|
||||||
|
create table t1 (f1 int not null primary key, f2 varchar(100),
|
||||||
|
FTS_DOC_ID bigint(20) unsigned not null auto_increment,
|
||||||
|
unique key `FTS_DOC_ID_INDEX` (`FTS_DOC_ID`),
|
||||||
|
fulltext key (f2))engine=innodb;
|
||||||
|
|
||||||
|
set auto_increment_increment = 65535;
|
||||||
|
insert into t1(f1, f2) values(1, "This is the first record");
|
||||||
|
insert into t1(f1, f2) values(2, "This is the second record");
|
||||||
|
insert into t1(f1, f2) values(3, "This is the third record");
|
||||||
|
select FTS_DOC_ID from t1;
|
||||||
|
drop table t1;
|
||||||
|
|
||||||
|
call mtr.add_suppression("\\[ERROR\\] InnoDB: Doc ID 20030101000000 is too big. Its difference with largest used Doc ID 0 cannot exceed or equal to 65535");
|
||||||
|
CREATE TABLE t1 (FTS_DOC_ID BIGINT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||||
|
title VARCHAR(200), FULLTEXT(title)) ENGINE=InnoDB;
|
||||||
|
--error 182
|
||||||
|
INSERT INTO t1 VALUES (NULL, NULL), (20030101000000, 20030102000000);
|
||||||
|
DROP TABLE t1;
|
@ -1442,8 +1442,7 @@ error_exit:
|
|||||||
doc_ids difference should not exceed
|
doc_ids difference should not exceed
|
||||||
FTS_DOC_ID_MAX_STEP value. */
|
FTS_DOC_ID_MAX_STEP value. */
|
||||||
|
|
||||||
if (next_doc_id > 1
|
if (doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
|
||||||
&& doc_id - next_doc_id >= FTS_DOC_ID_MAX_STEP) {
|
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Doc ID " UINT64PF " is too"
|
"InnoDB: Doc ID " UINT64PF " is too"
|
||||||
" big. Its difference with largest"
|
" big. Its difference with largest"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user