mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Bug#55873 short startup options do not work in 5.5
Before this fix, the server did not recognize 'short' (as in -a) options but only 'long' (as in --ansi) options in the startup command line, due to earlier changes in 5.5 introduced for the performance schema. The root cause is that handle_options() did not honor the my_getopt_skip_unknown flag when parsing 'short' options. The fix changes handle_options(), so that my_getopt_skip_unknown is honored in all cases. Note that there are limitations to this, see the added doxygen documentation in handle_options(). The current usage of handle_options() by the server to parse early performance schema options fits within the limitations. This has been enforced by an assert for PARSE_EARLY options, for safety.
This commit is contained in:
2
mysql-test/suite/perfschema/r/bad_option_3.result
Normal file
2
mysql-test/suite/perfschema/r/bad_option_3.result
Normal file
@ -0,0 +1,2 @@
|
||||
Found: unknown option '-x'
|
||||
Found: Aborting
|
2
mysql-test/suite/perfschema/r/bad_option_4.result
Normal file
2
mysql-test/suite/perfschema/r/bad_option_4.result
Normal file
@ -0,0 +1,2 @@
|
||||
Found: Can't change dir to.*bad_option_h_param
|
||||
Found: Aborting
|
2
mysql-test/suite/perfschema/r/bad_option_5.result
Normal file
2
mysql-test/suite/perfschema/r/bad_option_5.result
Normal file
@ -0,0 +1,2 @@
|
||||
Found: unknown option '-X'
|
||||
Found: Aborting
|
27
mysql-test/suite/perfschema/r/short_option_1.result
Normal file
27
mysql-test/suite/perfschema/r/short_option_1.result
Normal file
@ -0,0 +1,27 @@
|
||||
select 'Ok, the server started' as result;
|
||||
result
|
||||
Ok, the server started
|
||||
select @@SQL_MODE;
|
||||
@@SQL_MODE
|
||||
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
||||
show variables like 'sql_mode';
|
||||
Variable_name Value
|
||||
sql_mode REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
||||
select @@character_set_server;
|
||||
@@character_set_server
|
||||
utf8
|
||||
show variables like 'character_set_system';
|
||||
Variable_name Value
|
||||
character_set_system utf8
|
||||
show variables like 'log';
|
||||
Variable_name Value
|
||||
log ON
|
||||
show variables like 'general_log';
|
||||
Variable_name Value
|
||||
general_log ON
|
||||
show variables like 'new';
|
||||
Variable_name Value
|
||||
new ON
|
||||
show variables like 'log_warnings';
|
||||
Variable_name Value
|
||||
log_warnings 3
|
9
mysql-test/suite/perfschema/r/short_option_2.result
Normal file
9
mysql-test/suite/perfschema/r/short_option_2.result
Normal file
@ -0,0 +1,9 @@
|
||||
select 'Ok, the server started' as result;
|
||||
result
|
||||
Ok, the server started
|
||||
select @@SQL_MODE;
|
||||
@@SQL_MODE
|
||||
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
|
||||
select @@log_warnings;
|
||||
@@log_warnings
|
||||
5
|
Reference in New Issue
Block a user