mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 04:53:01 +01:00
378091e434
handling. The problem was that parsing of nested regular expression involved recursive calls. Such recursion didn't take into account the amount of available stack space, which ended up leading to stack overflow crashes. mysql-test/t/not_embedded_server.test: Added test for bug#58026. regex/my_regex.h: added pointer to function as last argument of my_regex_init() for check enough memory in stack. regex/regcomp.c: p_ere() was modified: added call to function for check enough memory in stack. Function for check available stack space specified by global variable my_regex_enough_mem_in_stack. This variable set to NULL for embedded mysqld and to a pointer to function check_enough_stack_size otherwise. regex/reginit.c: my_regex_init was modified: pass a pointer to a function for check enough memory in stack space. Reset this pointer to NULL in my_regex_end. sql/mysqld.cc: Added function check_enough_stack_size() for check enough memory in stack. Passed this function as second argument to my_regex_init. For embedded mysqld passed NULL as second argument.
55 lines
1.6 KiB
Text
55 lines
1.6 KiB
Text
#
|
|
# Here we collect tests that doesn't work with the embedded server
|
|
#
|
|
|
|
-- source include/not_embedded.inc
|
|
|
|
#
|
|
# Produce output
|
|
#
|
|
|
|
select 1;
|
|
|
|
# The following fails sporadically because 'check-testcase' runs
|
|
# queries before this test and there is no way to guarantee that any
|
|
# previous process finishes. The purpose of the test is not clearly
|
|
# stated, there is no reference to any bug report, and "select from
|
|
# I_S from prepared statement" doesn't look like something that's
|
|
# really imporant to test. I'm commenting out this for now. If
|
|
# anyone wants to keep this, please fix the race and motivate why we
|
|
# need to test this. If you see this comment and it is after mid-2009
|
|
# or so, feel free to remove this test from the file. /Sven
|
|
#
|
|
#
|
|
## Show full process list with prepare
|
|
## To not show other connections, this must be the first test and we must
|
|
## have a server restart before this one
|
|
##
|
|
## We don't have any 4.1 tests as we use I_S to query the PROCESSLIST to
|
|
## exclude system threads that may/may not be active in the server
|
|
## (namely the ndb injector thread)
|
|
##
|
|
## End of 4.1 tests
|
|
#
|
|
#prepare stmt1 from ' SELECT * FROM INFORMATION_SCHEMA.PROCESSLIST WHERE COMMAND!=\'Daemon\' ';
|
|
#--replace_column 1 number 6 time 3 localhost
|
|
#execute stmt1;
|
|
#deallocate prepare stmt1;
|
|
|
|
#
|
|
# Bug#43835: SHOW VARIABLES does not include 0 for slave_skip_errors
|
|
#
|
|
|
|
SHOW VARIABLES like 'slave_skip_errors';
|
|
|
|
--echo #
|
|
--echo # Bug#58026: massive recursion and crash in regular expression handling
|
|
--echo #
|
|
|
|
--disable_result_log
|
|
--error ER_STACK_OVERRUN_NEED_MORE
|
|
SELECT '1' RLIKE RPAD('1', 10000, '(');
|
|
--enable_result_log
|
|
|
|
|
|
# End of 5.1 tests
|