mirror of
https://github.com/MariaDB/server.git
synced 2025-09-09 18:40:27 +03:00
This allows one to run the test suite even if any of the following options are changed: - character-set-server - collation-server - join-cache-level - log-basename - max-allowed-packet - optimizer-switch - query-cache-size and query-cache-type - skip-name-resolve - table-definition-cache - table-open-cache - Some innodb options etc Changes: - Don't print out the value of system variables as one can't depend on them to being constants. - Don't set global variables to 'default' as the default may not be the same as the test was started with if there was an additional option file. Instead save original value and reset it at end of test. - Test that depends on the latin1 character set should include default_charset.inc or set the character set to latin1 - Test that depends on the original optimizer switch, should include default_optimizer_switch.inc - Test that depends on the value of a specific system variable should set it in the test (like optimizer_use_condition_selectivity) - Split subselect3.test into subselect3.test and subselect3.inc to make it easier to set and reset system variables. - Added .opt files for test that required specfic options that could be changed by external configuration files. - Fixed result files in rockdsb & tokudb that had not been updated for a while.
41 lines
1.9 KiB
Plaintext
41 lines
1.9 KiB
Plaintext
if (`select count(*) = 0 from information_schema.plugins where plugin_name = 'feedback' and plugin_status='active' and @@feedback_url <> ""`)
|
|
{
|
|
--skip Feedback plugin is not active
|
|
}
|
|
|
|
select plugin_status from information_schema.plugins where plugin_name='feedback';
|
|
|
|
# Every SELECT from INFORMATION_SCHEMA.FEEDBACK increases the value of 'FEEDBACK used'.
|
|
# We cannot record the actual value, because the test can be executed more than once,
|
|
# but we can check that the value indeed increases as expected.
|
|
# There is still a room for some race condition, e.g. if at the very moment
|
|
# between first SELECT to store the value and the next SELECT to check that it increases,
|
|
# the feedback plugin is activated. But the probability of it is close to 0,
|
|
# so lets get back to it if it ever happens.
|
|
|
|
# Lets say the plugin was used X times before this SELECT
|
|
SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
|
|
|
|
# Now $feedback_used == X+1, and 'FEEDBACK used' is also X+1. And variable_value is increased again when we run the next SELECT
|
|
SELECT variable_value = @feedback_used + 1 as 'MUST BE 1' FROM information_schema.feedback where variable_name = 'FEEDBACK used';
|
|
|
|
# Now when we are happy with 'FEEDBACK used', we can check everything else
|
|
|
|
--replace_result https http
|
|
--sorted_result
|
|
select * from information_schema.feedback where variable_name like 'feed%'
|
|
and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'
|
|
and variable_name not like '%debug%';
|
|
|
|
# Embedded server does not use the table mysqld.user and thus
|
|
# does not automatically use latin1_bin on startup. Use it manually.
|
|
--disable_query_log
|
|
if (`SELECT VERSION() LIKE '%embedded%'`)
|
|
{
|
|
DO _latin1'test' COLLATE latin1_bin;
|
|
}
|
|
--enable_query_log
|
|
SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK
|
|
WHERE VARIABLE_NAME LIKE 'Collation used %'
|
|
ORDER BY VARIABLE_NAME;
|