Description:
main.init_connect fails if MTR run with --mysqld=--query-cache-size=1000000
How to repeat:
$./mtr --mysqld=--query-cache-size=1000000 init_connect
Logging: ./mtr --mysqld=--query-cache-size=1000000 init_connect
100901 18:43:04 [Note] Plugin 'FEDERATED' is disabled.
100901 18:43:04 [Note] Plugin 'ndbcluster' is disabled.
MySQL Version 5.1.51
Checking supported features...
- using ndbcluster when necessary, mysqld supports it
- SSL connections supported
- binaries are debug compiled
Collecting tests...
vardir: /users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var
Checking leftover processes...
Removing old var directory...
- WARNING: Using the 'mysql-test/var' symlink
Creating var directory '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var'...
Installing system database...
Using server port 54905
worker[1] Using MTR_BUILD_THREAD 300, with reserved ports 13000..13009
==============================================================================
TEST RESULT TIME (ms)
------------------------------------------------------------
main.init_connect [ fail ]
Test ended at 2010-09-01 18:43:05
CURRENT_TEST: main.init_connect
mysqltest: At line 96: query 'select @x' failed: 2013: Lost connection to MySQL server during query
The result from queries just before the failure was:
< snip >
5
7
drop procedure p1;
set global init_connect="create procedure p1(x int)\
begin\
select count(*) from t1;\
select * from t1;\
set @x = x;
end";
call p1(42);
count(*)
3
x
3
5
7
select @x;
@x
42
set global init_connect="call p1(4711)";
More results from queries before failure can be found in /users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/log/init_connect.log
Server [mysqld.1 - pid: 2551, winpid: 2551, exit: 256] failed during test run
Server log from this test:
100901 19:43:04 [Warning] '--default-character-set' is deprecated and will be removed in a future release. Please use '--character-set-server' instead.
100901 19:43:04 [Warning] /users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld: Option '--set-variable' is deprecated. Use --variable-name=value instead.
100901 19:43:04 [Note] Plugin 'FEDERATED' is disabled.
100901 19:43:04 [Note] Plugin 'InnoDB' is disabled.
100901 19:43:04 [Note] Plugin 'ndbcluster' is disabled.
100901 19:43:04 [Note] Event Scheduler: Loaded 0 events
100901 19:43:04 [Note] /users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld: ready for connections.
Version: '5.1.51-debug-log' socket: '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/tmp/mysqld.1.sock' port: 13000 Source distribution
100901 19:43:04 [Warning] Aborted connection 8 to db: 'test' user: 'user_1' host: 'localhost' (init_connect command failed)
100901 19:43:04 [Warning] You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'adsfsdfsdfs' at line 1
mysqld: sql_cache.cc:1000: void query_cache_end_of_result(THD*): Assertion `0' failed.
100901 19:43:04 - mysqld got signal 6 ;
This could be because you hit a bug. It is also possible that this binary
or one of the libraries it was linked against is corrupt, improperly built,
or misconfigured. This error can also be caused by malfunctioning hardware.
We will try our best to scrape up some info that will hopefully help diagnose
the problem, but since we have already crashed, something is definitely wrong
and this may fail.
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=7
max_threads=151
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 60584 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
thd: 0x19ca4878
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x40b450f8 thread_stack 0x40000
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(my_print_stacktrace+0x35)[0xb28bd9]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(handle_segfault+0x288)[0x697aa2]
/lib64/libpthread.so.0[0x3429e0dd40]
/lib64/libc.so.6(gsignal+0x35)[0x3429230015]
/lib64/libc.so.6(abort+0x110)[0x3429231980]
/lib64/libc.so.6(__assert_fail+0xf6)[0x3429229726]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_Z25query_cache_end_of_resultP3THD+0x25c)[0x8501a9]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_ZN13sp_instr_stmt7executeEP3THDPj+0x210)[0x898404]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_ZN7sp_head7executeEP3THD+0x5e8)[0x89433c]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_ZN7sp_head17execute_procedureEP3THDP4ListI4ItemE+0x74c)[0x895fe6]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_Z21mysql_execute_commandP3THD+0x7424)[0x6b0d71]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_Z11mysql_parseP3THDPcjPPKc+0x2ef)[0x6b558b]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_Z16dispatch_command19enum_server_commandP3THDPcj+0xda6)[0x6a7aa3]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(_Z20execute_init_commandP3THDP11sys_var_strP16pthread_rwlock_t+0xea)[0x6a5866]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld[0x6a4a0b]
/users/ssmirnova/blade12/src/mysql-5.1/sql/mysqld(handle_one_connection+0x13e)[0x6a4c35]
/lib64/libpthread.so.0[0x3429e061b5]
/lib64/libc.so.6(clone+0x6d)[0x34292cd39d]
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x19cb3478 = select count(*) from t1
thd->thread_id=11
thd->killed=NOT_KILLED
The manual page at http://dev.mysql.com/doc/mysql/en/crashing.html contains
information that should help you find out what is causing the crash.
Writing a core file
- saving '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/log/main.init_connect/' to '/users/ssmirnova/blade12/src/mysql-5.1/mysql-test/var/log/main.init_connect/'
- found 'core.2552' (0/5)