403Webshell
Server IP : 104.21.38.3  /  Your IP : 162.158.108.91
Web Server : Apache
System : Linux krdc-ubuntu-s-2vcpu-4gb-amd-blr1-01.localdomain 5.15.0-142-generic #152-Ubuntu SMP Mon May 19 10:54:31 UTC 2025 x86_64
User : www ( 1000)
PHP Version : 7.4.33
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /www/server/mysql/src/mysql-test/suite/innodb_fts/t/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/server/mysql/src/mysql-test/suite/innodb_fts/t/ngram_1.test
# Test fulltext with ngram parser

--source include/no_valgrind_without_big.inc
--source include/have_innodb.inc
--source include/have_innodb_zip.inc

# Because we have inserted row size > 2k, we require page size > 4k.
if (`SELECT COUNT(*) = 1 FROM INFORMATION_SCHEMA.GLOBAL_STATUS WHERE LOWER(variable_name) = 'innodb_page_size' AND variable_value = 4096`)
{
  --skip Test requires InnoDB with Page size > 4k
}

LET $per_table = `select @@innodb_file_per_table`;

-- echo # Test Case : With default row type
LET $table_row_format =  ROW_FORMAT=DEFAULT ;
--source suite/innodb_fts/include/ngram.inc

-- echo # Test Case : with compact row type
LET $table_row_format =  ROW_FORMAT=COMPACT ;
--source suite/innodb_fts/include/ngram.inc


-- echo # Test Case : With redundant row type
LET $table_row_format =  ROW_FORMAT=REDUNDANT ;
--source suite/innodb_fts/include/ngram.inc


-- echo # Test Case : With Dynamic row type
LET $table_row_format =  ROW_FORMAT=DYNAMIC ;
--source suite/innodb_fts/include/ngram.inc


-- echo # Test Case : With compressed row type
LET $table_row_format =  ROW_FORMAT=COMPRESSED ;
--source suite/innodb_fts/include/ngram.inc

EVAL SET GLOBAL innodb_file_per_table = $per_table;

#
## Bug #25873310  FULLTEXT SEARCH CAN NOT FIND WORD WHICH CONTAINS "," OR "."
#

SET GLOBAL innodb_ft_enable_stopword=OFF;
SET innodb_ft_enable_stopword=OFF;

let @old_innodb_ft_aux_table = `select @@innodb_ft_aux_table`;
CREATE TABLE ft_test3(
       id INT NOT NULL,
       contents TEXT,
       PRIMARY KEY(id),
       FULLTEXT INDEX fx_contents(contents) WITH PARSER NGRAM
     ) ENGINE=INNODB;

SET GLOBAL innodb_ft_aux_table='test/ft_test3';
INSERT INTO ft_test3 VALUES (1, 'xy,yz');

SELECT * FROM INFORMATION_SCHEMA.INNODB_FT_INDEX_CACHE ORDER BY position;
SELECT * FROM ft_test3 WHERE MATCH(contents) AGAINST('y,' IN BOOLEAN MODE);
SELECT * FROM ft_test3 WHERE MATCH(contents) AGAINST('y,' IN NATURAl LANGUAGE MODE);

SET GLOBAL innodb_ft_enable_stopword = ON;
SET GLOBAL innodb_ft_aux_table = @old_innodb_ft_aux_table;
DROP TABLE ft_test3;

Youez - 2016 - github.com/yon3zu
LinuXploit