[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@13.59.62.63: ~ $
--disable_warnings
DROP TABLE IF EXISTS t1,t2,t3;
--enable_warnings

CREATE TABLE t1 (
  a INT AUTO_INCREMENT PRIMARY KEY,
  message CHAR(20),
  FULLTEXT(message)
) ENGINE = InnoDB comment = 'original testcase by sroussey@network54.com';
INSERT INTO t1 (message) VALUES ("Testing"),("table"),("testbug"),
        ("steve"),("is"),("cool"),("steve is cool");
-- disable_result_log
ANALYZE TABLE t1;
-- enable_result_log
# basic MATCH
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) FROM t1 WHERE MATCH (message) AGAINST ('steve');
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve');
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE);
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE);

# MATCH + ORDER BY (with ft-ranges)
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY a;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY a;

# MATCH + ORDER BY (with normal ranges) + UNIQUE
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) FROM t1 WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve') ORDER BY a DESC;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE a in (2,7,4) and MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY a DESC;

# MATCH + ORDER BY + UNIQUE (const_table)
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) FROM t1 WHERE a=7 and MATCH (message) AGAINST ('steve') ORDER BY 1;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) FROM t1 WHERE a=7 and MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) ORDER BY 1;

# ORDER BY MATCH
# INNODB_FTS: INVESITGATE
SELECT a, FORMAT(MATCH (message) AGAINST ('steve'),6) as rel FROM t1 ORDER BY rel;
SELECT a, MATCH (message) AGAINST ('steve' IN BOOLEAN MODE) as rel FROM t1 ORDER BY rel;

#
# BUG#6635 - test_if_skip_sort_order() thought it can skip filesort
# for fulltext searches too
#
alter table t1 add key m (message);
-- disable_result_log
ANALYZE TABLE t1;
-- enable_result_log
explain SELECT message FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY message;
SELECT message FROM t1 WHERE MATCH (message) AGAINST ('steve') ORDER BY message desc;

drop table t1;

#
# reused boolean scan bug
#
CREATE TABLE t1 (
  a INT AUTO_INCREMENT PRIMARY KEY,
  message CHAR(20),
  FULLTEXT(message)
) ENGINE = InnoDB;
INSERT INTO t1 (message) VALUES ("testbug"),("testbug foobar");
-- disable_result_log
ANALYZE TABLE t1;
-- enable_result_log
SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1;
SELECT a, MATCH (message) AGAINST ('t* f*' IN BOOLEAN MODE) as rel FROM t1 ORDER BY rel,a;
drop table t1;

# BUG#11869
CREATE TABLE t1 (
  id int(11) NOT NULL auto_increment,
  thread int(11) NOT NULL default '0',
  beitrag longtext NOT NULL,
  PRIMARY KEY  (id),
  KEY thread (thread),
  FULLTEXT KEY beitrag (beitrag)
) ENGINE =InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=7923 ;

CREATE TABLE t2 (
  id int(11) NOT NULL auto_increment,
  text varchar(100) NOT NULL default '',
  PRIMARY KEY  (id),
  KEY text (text)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=63 ;

CREATE TABLE t3 (
  id int(11) NOT NULL auto_increment,
  forum int(11) NOT NULL default '0',
  betreff varchar(70) NOT NULL default '',
  PRIMARY KEY  (id),
  KEY forum (forum),
  FULLTEXT KEY betreff (betreff)
) ENGINE = InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=996 ;

--error ER_CANT_USE_OPTION_HERE
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(b.betreff) against ('+abc' in boolean mode)
group by a.text, b.id, b.betreff
union
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(c.beitrag) against ('+abc' in boolean mode)
group by 
  a.text, b.id, b.betreff
order by 
  match(b.betreff) against ('+abc' in boolean mode) desc;
  
--error ER_CANT_USE_OPTION_HERE
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(b.betreff) against ('+abc' in boolean mode)
union
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(c.beitrag) against ('+abc' in boolean mode)
order by 
  match(b.betreff) against ('+abc' in boolean mode) desc;

--error ER_CANT_USE_OPTION_HERE
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(b.betreff) against ('+abc' in boolean mode)
union
select a.text, b.id, b.betreff
from 
  t2 a inner join t3 b on a.id = b.forum inner join
  t1 c on b.id = c.thread
where 
  match(c.beitrag) against ('+abc' in boolean mode)
order by 
  match(betreff) against ('+abc' in boolean mode) desc;

# BUG#11869 part2: used table type doesn't support FULLTEXT indexes error
(select b.id, b.betreff from t3 b) union 
(select b.id, b.betreff from t3 b) 
order by match(betreff) against ('+abc' in boolean mode) desc;

--error ER_FT_MATCHING_KEY_NOT_FOUND
(select b.id, b.betreff from t3 b) union 
(select b.id, b.betreff from t3 b) 
order by match(betreff) against ('+abc') desc;

select distinct b.id, b.betreff from t3 b 
order by match(betreff) against ('+abc' in boolean mode) desc;

select b.id, b.betreff from t3 b group by b.id+1 
order by match(betreff) against ('+abc' in boolean mode) desc;

drop table t1,t2,t3;

# End of 4.1 tests

Filemanager

Name Type Size Permission Actions
disabled.def File 404 B 0644
fts_compatibility.test File 9.74 KB 0644
fts_compatibility_win.test File 9.58 KB 0644
fulltext.test File 22.1 KB 0644
fulltext2.test File 8.27 KB 0644
fulltext3.test File 988 B 0644
fulltext_cache.test File 1.55 KB 0644
fulltext_distinct.test File 1.18 KB 0644
fulltext_left_join.test File 4.54 KB 0644
fulltext_misc.test File 7.75 KB 0644
fulltext_multi.test File 919 B 0644
fulltext_order_by.test File 5.57 KB 0644
fulltext_plugin-master.opt File 19 B 0644
fulltext_update.test File 1.02 KB 0644
fulltext_var.test File 1.36 KB 0644
innobase_drop_fts_index_table.test File 407 B 0644
innodb-fts-basic.test File 8.74 KB 0644
innodb-fts-ddl.test File 9.15 KB 0644
innodb-fts-fic.test File 7.12 KB 0644
innodb-fts-stopword.test File 30.48 KB 0644
innodb_fts_index_table.test File 3.32 KB 0644
innodb_fts_large_records.test File 12.15 KB 0644
innodb_fts_misc.test File 55.24 KB 0644
innodb_fts_misc_1.test File 33.01 KB 0644
innodb_fts_misc_debug.test File 6.81 KB 0644
innodb_fts_multiple_index.test File 6.34 KB 0644
innodb_fts_opt.test File 14.02 KB 0644
innodb_fts_plugin.test File 1.35 KB 0644
innodb_fts_proximity.test File 7.98 KB 0644
innodb_fts_result_cache_limit.test File 1.76 KB 0644
innodb_fts_savepoint.test File 9.09 KB 0644
innodb_fts_stopword_charset.test File 13.79 KB 0644
innodb_fts_transaction.test File 31.11 KB 0644
phrase.test File 1.01 KB 0644
subexpr.test File 2.09 KB 0644
sync.test File 5.33 KB 0644
sync_block.test File 3.48 KB 0644