mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
Percona-Server-5.6.14-rel62.0 merge
support ha_innodb.so as a dynamic plugin. * remove obsolete *,innodb_plugin.rdiff files * s/--plugin-load=/--plugin-load-add=/ * MYSQL_PLUGIN_IMPORT glob_hostname[] * use my_error instead of push_warning_printf(ER_DEFAULT) * don't use tdc_size and tc_size in a module update test cases (XtraDB is 5.6.14, InnoDB is 5.6.10) * copy new tests over * disable some tests for (old) InnoDB * delete XtraDB tests that no longer apply small compatibility changes: * s/HTON_EXTENDED_KEYS/HTON_SUPPORTS_EXTENDED_KEYS/ * revert unnecessary InnoDB changes to make it a bit closer to the upstream fix XtraDB to compile on Windows (both as a static and a dynamic plugin) disable XtraDB on Windows (deadlocks) and where no atomic ops are available (e.g. CentOS 5) storage/innobase/handler/ha_innodb.cc: revert few unnecessary changes to make it a bit closer to the original InnoDB storage/innobase/include/univ.i: correct the version to match what it was merged from
This commit is contained in:
@@ -476,6 +476,7 @@ insert into t50 (s2) values ('FGHIJ'),('KLMNO'),('VÐƷWİ'),('ABCD*');
|
||||
select * from t50 where match(s2) against ('abcd*' in natural language
|
||||
mode);
|
||||
id s2
|
||||
4 ABCD*
|
||||
select * from t50 where match(s2) against ('abcd*' in boolean mode);
|
||||
id s2
|
||||
4 ABCD*
|
||||
@@ -659,16 +660,16 @@ Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
INSERT INTO t1 VALUES (1,'ペペペ'),(2,'テテテ'),(3,'ルルル'),(4,'グググ');
|
||||
DROP TABLE t1;
|
||||
"----------Test15a--------"
|
||||
CREATE TABLE t1 (s1 VARCHAR (60) CHARACTER SET UTF8 COLLATE UTF8_UNICODE_CI) ENGINE = MyISAM;
|
||||
"----------Test15---------"
|
||||
CREATE TABLE t1 (s1 VARCHAR (60) CHARACTER SET UTF8 COLLATE UTF8_UNICODE_520_CI) ENGINE = MyISAM;
|
||||
CREATE FULLTEXT INDEX i ON t1 (s1);
|
||||
INSERT INTO t1 VALUES
|
||||
('a'),('b'),('c'),('d'),('ÓÓÓÓ'),('OOOO'),(NULL),('ÓÓÓÓ ÓÓÓÓ'),('OOOOOOOO');
|
||||
SELECT * FROM t1 WHERE MATCH(s1) AGAINST ('OOOO' COLLATE UTF8_UNICODE_CI);
|
||||
('a'),('b'),('c'),('d'),('ŁŁŁŁ'),('LLLL'),(NULL),('ŁŁŁŁ ŁŁŁŁ'),('LLLLLLLL');
|
||||
SELECT * FROM t1 WHERE MATCH(s1) AGAINST ('LLLL' COLLATE UTF8_UNICODE_520_CI);
|
||||
s1
|
||||
ÓÓÓÓ
|
||||
OOOO
|
||||
ÓÓÓÓ ÓÓÓÓ
|
||||
ŁŁŁŁ
|
||||
LLLL
|
||||
ŁŁŁŁ ŁŁŁŁ
|
||||
DROP TABLE if EXISTS t2;
|
||||
Warnings:
|
||||
Note 1051 Unknown table 'test.t2'
|
||||
@@ -677,10 +678,10 @@ CREATE FULLTEXT INDEX i ON t2 ( s1);
|
||||
Warnings:
|
||||
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID
|
||||
INSERT INTO t2 VALUES
|
||||
('a'),('b'),('c'),('d'),('ÓÓÓÓ'),('OOOO'),(NULL),('ÓÓÓÓ ÓÓÓÓ'),('OOOOOOOO');
|
||||
SELECT * FROM t2 WHERE MATCH(s1) AGAINST ('OOOO' COLLATE UTF8_UNICODE_CI);
|
||||
('a'),('b'),('c'),('d'),('ŁŁŁŁ'),('LLLL'),(NULL),('ŁŁŁŁ ŁŁŁŁ'),('LLLLLLLL');
|
||||
SELECT * FROM t2 WHERE MATCH(s1) AGAINST ('LLLL' COLLATE UTF8_UNICODE_520_CI);
|
||||
s1
|
||||
OOOO
|
||||
LLLL
|
||||
DROP TABLE t1,t2;
|
||||
"----------Test16---------"
|
||||
CREATE TABLE t1 (s1 INT, s2 VARCHAR(50) CHARACTER SET UTF8) ENGINE = InnoDB;
|
||||
@@ -1237,3 +1238,192 @@ DROP TABLE `A B`;
|
||||
CREATE TABLE `t-26`(a VARCHAR(10),FULLTEXT KEY(a)) ENGINE=INNODB;
|
||||
INSERT INTO `t-26` VALUES('117');
|
||||
DROP TABLE `t-26`;
|
||||
CREATE TABLE `t1` (
|
||||
`id` INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,
|
||||
`content` TEXT NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
FULLTEXT INDEX `IDX_CONTEXT_FULLTEXT`(`content`)
|
||||
)
|
||||
ENGINE = InnoDB;
|
||||
insert into t1 (content)
|
||||
values
|
||||
('This is a story which has has a complicated phrase structure here in the
|
||||
middle'),
|
||||
('This is a story which doesn''t have that text'),
|
||||
('This is a story that has complicated the phrase structure');
|
||||
select * from t1
|
||||
where match(content) against('"complicated phrase structure"' in boolean
|
||||
mode);
|
||||
id content
|
||||
1 This is a story which has has a complicated phrase structure here in the
|
||||
middle
|
||||
select * from t1
|
||||
where match(content) against('+"complicated phrase structure"' in boolean
|
||||
mode);
|
||||
id content
|
||||
1 This is a story which has has a complicated phrase structure here in the
|
||||
middle
|
||||
select * from t1
|
||||
where match(content) against('"complicated the phrase structure"' in boolean
|
||||
mode);
|
||||
id content
|
||||
3 This is a story that has complicated the phrase structure
|
||||
select * from t1 where match(content) against('+"this is a story which" +"complicated the phrase structure"' in boolean mode);
|
||||
id content
|
||||
select * from t1 where match(content) against('"the complicated the phrase structure"' in boolean mode);
|
||||
id content
|
||||
3 This is a story that has complicated the phrase structure
|
||||
select * from t1 where match(content) against('"complicated a phrase structure"' in boolean mode);
|
||||
id content
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE my (id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
c VARCHAR(32), FULLTEXT(c)) ENGINE = INNODB;
|
||||
INSERT INTO my (c) VALUES ('green-iguana');
|
||||
SELECT * FROM my WHERE MATCH(c) AGAINST ('green-iguana');
|
||||
id c
|
||||
1 green-iguana
|
||||
DROP TABLE my;
|
||||
CREATE TABLE ift (
|
||||
`a` int(11) NOT NULL,
|
||||
`b` text,
|
||||
PRIMARY KEY (`a`),
|
||||
FULLTEXT KEY `b` (`b`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
|
||||
INSERT INTO ift values (1, "skip");
|
||||
INSERT INTO ift values (2, "skip and networking");
|
||||
INSERT INTO ift values (3, "--skip-networking");
|
||||
INSERT INTO ift values (4, "-donot--skip-networking");
|
||||
SELECT * FROM ift WHERE MATCH (b) AGAINST ('--skip-networking');
|
||||
a b
|
||||
2 skip and networking
|
||||
3 --skip-networking
|
||||
4 -donot--skip-networking
|
||||
1 skip
|
||||
SELECT * FROM ift WHERE MATCH (b) AGAINST ('skip-networking');
|
||||
a b
|
||||
2 skip and networking
|
||||
3 --skip-networking
|
||||
4 -donot--skip-networking
|
||||
1 skip
|
||||
SELECT * FROM ift WHERE MATCH (b) AGAINST ('----');
|
||||
a b
|
||||
SELECT * FROM ift WHERE MATCH (b) AGAINST ('-donot--skip-networking');
|
||||
a b
|
||||
4 -donot--skip-networking
|
||||
2 skip and networking
|
||||
3 --skip-networking
|
||||
1 skip
|
||||
DROP TABLE ift;
|
||||
CREATE TABLE articles (
|
||||
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
title VARCHAR(200),
|
||||
body TEXT,
|
||||
FULLTEXT (title,body)
|
||||
) ENGINE=InnoDB;
|
||||
INSERT INTO articles (title,body) VALUES
|
||||
('MySQL Tutorial','DBMS stands for DataBase ...') ,
|
||||
('How To Use MySQL Well','After you went through a ...'),
|
||||
('Optimizing MySQL','In this tutorial we will show ...'),
|
||||
('1001 MySQL Tricks','1. Never run mysqld as root. 2. ...'),
|
||||
('MySQL vs. YourSQL','In the following database comparison ...'),
|
||||
('( that''s me )','When configured properly, MySQL ...');
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('( yours''s* )' IN BOOLEAN MODE);
|
||||
id title body
|
||||
5 MySQL vs. YourSQL In the following database comparison ...
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('s*' IN BOOLEAN MODE);
|
||||
id title body
|
||||
1 MySQL Tutorial DBMS stands for DataBase ...
|
||||
3 Optimizing MySQL In this tutorial we will show ...
|
||||
SELECT * FROM articles WHERE MATCH (title,body)
|
||||
AGAINST ('stands\'] | * | show[@database' IN NATURAL LANGUAGE MODE);
|
||||
id title body
|
||||
1 MySQL Tutorial DBMS stands for DataBase ...
|
||||
3 Optimizing MySQL In this tutorial we will show ...
|
||||
5 MySQL vs. YourSQL In the following database comparison ...
|
||||
DROP TABLE articles;
|
||||
CREATE TABLE t1(a TEXT CHARACTER SET LATIN1, FULLTEXT INDEX(a)) ENGINE=INNODB;
|
||||
SELECT * FROM t1 WHERE MATCH(a) AGAINST("*");
|
||||
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
a VARCHAR(200),
|
||||
FULLTEXT (a)
|
||||
) ENGINE= InnoDB;
|
||||
INSERT INTO t1 (a) VALUES
|
||||
('Do you know MySQL is a good database'),
|
||||
('How to build a good database'),
|
||||
('Do you know'),
|
||||
('Do you know MySQL'),
|
||||
('How to use MySQL'),
|
||||
('Do you feel good'),
|
||||
('MySQL is good'),
|
||||
('MySQL is good to know'),
|
||||
('What is database');
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"know mysql"' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+("know mysql")' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('("know mysql" good)' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
2 How to build a good database
|
||||
6 Do you feel good
|
||||
7 MySQL is good
|
||||
8 MySQL is good to know
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+("know mysql" good)' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
2 How to build a good database
|
||||
6 Do you feel good
|
||||
7 MySQL is good
|
||||
8 MySQL is good to know
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('(good "know mysql")' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
2 How to build a good database
|
||||
6 Do you feel good
|
||||
7 MySQL is good
|
||||
8 MySQL is good to know
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+(good "know mysql")' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
4 Do you know MySQL
|
||||
2 How to build a good database
|
||||
6 Do you feel good
|
||||
7 MySQL is good
|
||||
8 MySQL is good to know
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+("know mysql" "good database")' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
2 How to build a good database
|
||||
4 Do you know MySQL
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"know mysql" +"good database"' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"know database"@4' IN BOOLEAN MODE);
|
||||
id a
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"know database"@8' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 Do you know MySQL is a good database
|
||||
DROP TABLE t1;
|
||||
CREATE TABLE t1 (
|
||||
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
|
||||
a VARCHAR(200),
|
||||
FULLTEXT (a)
|
||||
) ENGINE= InnoDB;
|
||||
INSERT INTO t1 (a) VALUES
|
||||
('know mysql good database');
|
||||
SELECT * FROM t1 WHERE MATCH (a) AGAINST ('+"good database"' IN BOOLEAN MODE);
|
||||
id a
|
||||
1 know mysql good database
|
||||
DROP TABLE t1;
|
||||
|
Reference in New Issue
Block a user