Server IP : 172.67.216.182 / Your IP : 162.158.170.195 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/query_rewrite_plugins/t/ |
Upload File : |
--echo # --echo # Tests that the character set setting is properly picked up by the --echo # session that reads the rules table. --echo # --source suite/query_rewrite_plugins/include/have_plugin_rewriter.inc --source suite/query_rewrite_plugins/include/install_rewriter_with_optional_columns.inc --echo # Let's be clear on what the global and session values are --echo # for this variable. SHOW VARIABLES LIKE 'character_set_client'; SHOW SESSION VARIABLES LIKE 'character_set_client'; SHOW GLOBAL VARIABLES LIKE 'character_set_client'; --source suite/query_rewrite_plugins/include/trivial.inc --echo # We now set the global value of the variable, this should not affect --echo # the plugin. It should copy the session value from our session. SET @@global.character_set_client = utf8; SELECT * FROM mydb.mytable WHERE mycol = 'xxx'; --echo # Regenerating the digests should still work. CALL query_rewrite.flush_rewrite_rules(); SELECT * FROM mydb.mytable WHERE mycol = 'xxx'; --echo # We now repeat the above test with a character set where the digests --echo # are known to differ. If we were lucky the last time, it will show now. --echo # The global setting should still be ignored. SET @@global.character_set_client = latin1; SELECT * FROM mydb.mytable WHERE mycol = 'xxx'; --echo # Regenerating the digests should still work. CALL query_rewrite.flush_rewrite_rules(); SELECT * FROM mydb.mytable WHERE mycol = 'xxx'; SET @@global.character_set_client = DEFAULT; --echo # --echo # This is perhaps an unwanted result, but the rules table-reading --echo # session can't access our session's setting. --echo # SET @@session.character_set_client = utf8; --source suite/query_rewrite_plugins/include/trivial.inc SET @@session.character_set_client = DEFAULT; --source suite/query_rewrite_plugins/include/uninstall_rewriter.inc