[MDEV-17116] After upgrade from 10.1.35 to 10.3.9, SELECT query in prepared statement does not write in provided buffer Created: 2018-08-31  Updated: 2019-05-28  Resolved: 2018-09-30

Status: Closed
Project: MariaDB Server
Component/s: Prepared Statements
Affects Version/s: 10.3.9
Fix Version/s: N/A

Type: Bug Priority: Critical
Reporter: Noel Kuntze Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: need_feedback
Environment:

Arch Linux, gcc8


Issue Links:
Relates
relates to CONC-301 Using mysql_stmt_bind_result() in pre... Closed

 Description   

In a massively multi threaded environment, a SELECT query in a prepared statement does not return any data. The provided buffer is not written to by the libmariadbclient library. The data is retrieved using mysql_stmt_fetch() after the statement was initiated on a working connection, buffers bound and the query executed. The code worked as intended in at least version 10.1.35 (where the problem was a double free in libmysqlclient, thus the upgrade).

The query is as follows:
"SELECT id, address FROM addresses WHERE pool = ? AND identity = 0 LIMIT 1"

The query data is NOT cached on the client side. It is retrieved on-demand by the thread that consumes the data. Locking is not an issue in the code (what was previously reported in MDEV-16693).



 Comments   
Comment by Elena Stepanova [ 2018-09-02 ]

Can you provide a complete example with the dataset and the client-side application which reproduces the problem?

Comment by Noel Kuntze [ 2019-05-28 ]

Likely fixed in CONC-301

Generated at Thu Feb 08 08:34:02 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.