Current Path : /home/usr.opt/mysql57/mysql-test/suite/query_rewrite_plugins/t/ |
FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64 |
Current File : //home/usr.opt/mysql57/mysql-test/suite/query_rewrite_plugins/t/rules_table.test |
--echo # --echo # Test of a rules table with columns in different order. --echo # --source suite/query_rewrite_plugins/include/have_plugin_rewriter.inc --echo # Here we create a rules table with columns in different order. CREATE DATABASE query_rewrite; CREATE TABLE IF NOT EXISTS query_rewrite.rewrite_rules ( pattern_database VARCHAR(20), enabled ENUM('YES', 'NO') CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT 'YES', replacement VARCHAR(10000), message VARCHAR(1000), pattern VARCHAR(10000) ); --source suite/query_rewrite_plugins/include/install_rewriter.inc INSERT INTO query_rewrite.rewrite_rules ( pattern, replacement ) VALUES ( 'SELECT "rewrite me"', 'SELECT "rewritten"' ); CALL query_rewrite.flush_rewrite_rules(); SELECT pattern, pattern_database, replacement, message FROM query_rewrite.rewrite_rules; SELECT "rewrite me"; --source suite/query_rewrite_plugins/include/uninstall_rewriter.inc