Details
-
Bug
-
Status: Closed (View Workflow)
-
Critical
-
Resolution: Fixed
-
10.2.4
-
Linux Debian 8.6 / 64bits, Windows 10 / 64bits
-
10.2.6-2, 10.2.6-3
Description
Same code working with 10.1 now hangs when executing a simple SELECT ...
So far could only enable server log to see what happens.
Must investigate to enable more detailed log or debug info... any suggestion is welcome.
Tcp port: 3309 Unix socket: /opt3/dbs/mdb/10.2/data/mysqld.sock
|
Time Id Command Argument
|
170313 18:36:53 7 Connect mysuser@localhost as anonymous on test1
|
7 Query SELECT @@version
|
7 Query SET autocommit=1
|
7 Prepare delete from dbit2
|
7 Execute delete from dbit2
|
7 Close stmt
|
7 Prepare insert into dbit2 VALUES (1,'aaa','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Execute insert into dbit2 VALUES (1,'aaa','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Close stmt
|
7 Prepare insert into dbit2 VALUES (2,'bbb','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Execute insert into dbit2 VALUES (2,'bbb','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Close stmt
|
7 Prepare insert into dbit2 VALUES (3,'ccc','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Execute insert into dbit2 VALUES (3,'ccc','bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb')
|
7 Prepare select dbit2_key from dbit2 where dbit2_key<?
|
7 Prepare select dbit2_key from dbit2 where dbit2_key<?
|
7 Execute select dbit2_key from dbit2 where dbit2_key<-1
|
Have stopped and restarted the server several times, only one single client connects.... strange.
Attachments
Issue Links
- relates to
-
MDEV-12084 Test timeouts on CentOS - interaction between server and client stops
-
- Open
-
Double prepare:
To make it short, our programming language Genero BDL has 2 instructions to prepare and then declare a cursor:
PREPARE s153 FROM "SELECT dbit2_key FROM dbit2 WHERE dbit2_key<?" -- ends up as Prepare 1
DECLARE c153 CURSOR FOR s153 -- ends up as Prepare 2
LET n = -1
OPEN c153 USING n -- ends up as Execute
In fact, the Genero BDL code does an OPEN USING followed by FOREACH loop. This ends up in a first call to mysql_stmt_bind_param() + mysql_stmt_execute(), and then the FOREACH makes again a call to mysql_stmt_execute()...
(I must admit this is very particular but legal code, that we have to support)
LET n = -1
OPEN c153 USING n -- ends up as a mysql_stmt_bind_param() + mysql_stmt_execute()
FOREACH c153 -- ends up as a second mysql_stmt_execute()
I suspect however that MariaDB does not deal properly with these subsequent executes, or that we misuse the MariaDB client API in this case... (but our C code implementing these instructions exists for a while and is working fine with MySQL 5.7 client and MariaDB 10.1)
I will try to provide a pure MySQL C sample that reproduces the problem.