summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/innodb_fts/t/basic.test
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/innodb_fts/t/basic.test
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/innodb_fts/t/basic.test')
-rw-r--r--mysql-test/suite/innodb_fts/t/basic.test64
1 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/suite/innodb_fts/t/basic.test b/mysql-test/suite/innodb_fts/t/basic.test
new file mode 100644
index 00000000..df2e24fa
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/t/basic.test
@@ -0,0 +1,64 @@
+# This is the basic function tests for innodb FTS
+
+-- source include/have_innodb.inc
+--let $modify_create_table= 1
+-- source include/maybe_versioning.inc
+
+let $basic_stage= create_table;
+--source basic.inc
+
+let $basic_stage= insert_1;
+--source basic.inc
+
+-- disable_result_log
+ANALYZE TABLE articles;
+-- enable_result_log
+
+let $basic_stage= select_1;
+--source basic.inc
+
+let $basic_stage= insert_2;
+--source basic.inc
+
+let $basic_stage= select_2;
+--source basic.inc
+
+let $basic_stage= insert_3;
+--source basic.inc
+
+let $basic_stage= select_3;
+--source basic.inc
+
+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;
+
+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);
+DROP TABLE t1;