mysqltest crashes on an attempt to send a query when no connection is active

Bug #994156 reported by Elena Stepanova
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Committed
Low
Vladislav Vaintroub

Bug Description

#2 0x00000000004275a9 in signal_handler (sig=11) at /home/elenst/maria-5.5/client/mysqltest.cc:8571
#3 <signal handler called>
#4 0x0000000000434a40 in mysql_send_query (mysql=0x0, query=0x193b790 "SELECT 1", length=8) at /home/elenst/maria-5.5/sql-common/client.c:3920
#5 0x0000000000434b23 in mysql_real_query (mysql=0x0, query=0x193b790 "SELECT 1", length=8) at /home/elenst/maria-5.5/sql-common/client.c:3931
#6 0x00000000004161c2 in wrap_mysql_real_query (mysql=0x0, stmt_str=0x193b790 "SELECT 1", length=8) at /home/elenst/maria-5.5/client/../tests/nonblock-wrappers.h:175
#7 0x000000000041acf9 in var_query_set (var=0x193b670, query=0x193ae01 "SELECT 1`", query_end=0x7fff53b35da0) at /home/elenst/maria-5.5/client/mysqltest.cc:2519
#8 0x000000000041b9c2 in eval_expr (v=0x193b670, p=0x193ae00 "`SELECT 1`", p_end=0x7fff53b35da0, open_end=false, do_eval=true) at /home/elenst/maria-5.5/client/mysqltest.cc:2821
#9 0x000000000041a79c in var_set (var_name=0x193ad85 "a = `SELECT 1`", var_name_end=0x193ad86 " = `SELECT 1`", var_val=0x193ae00 "`SELECT 1`", var_val_end=0x193ae0a "") at /home/elenst/maria-5.5/client/mysqltest.cc:2381
#10 0x000000000041f71e in do_let (command=0x193ac30) at /home/elenst/maria-5.5/client/mysqltest.cc:4763
#11 0x0000000000428667 in main (argc=11, argv=0x7fff53b36228) at /home/elenst/maria-5.5/client/mysqltest.cc:9006

bzr version-info
revision-id: <email address hidden>
date: 2012-05-03 16:00:41 +0300
build-date: 2012-05-03 23:09:38 +0400
revno: 3392

Also reproducible on MariaDB 5.1, 5.2, 5.3. No crash on MySQL 5.5 or MySQL trunk.

# Test case
# Run either from MTR or as
# mysqltest --socket=<your_socket> -uroot < t.test

connect (con1,localhost,root,,);
disconnect con1;
# Just to wait till it is disconnected
--sleep 2
let $a = `SELECT 1`;
connection default;

# End of test case

Tags: tests

Related branches

Changed in maria:
milestone: 5.1 → 5.2
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.