[MDEV-19499] Prepared statements with 1000 binary parameters and utf8 collation returns no data Created: 2019-05-16 Updated: 2023-04-27 |
|
| Status: | Confirmed |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements, Protocol |
| Affects Version/s: | 10.3.3, 10.3, 10.4 |
| Fix Version/s: | 10.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Julius | Assignee: | Alexander Barkov |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Environment: |
docker image, utf8 collation, prepared statement with > 999 binary parameters. |
||
| Attachments: |
|
| Description |
|
Since MariaDB 10.3.3 executing prepared statement with more than 999 parameters (binary blobs) return empty data set and no errors if utf8 collation is used and binary blobs contain non ASCII characters (symbols with codes of 128 or higher). Same query with 999 parameters works fine, having 1000 parameters returns no data. Go proof of concept app We have stumbled on this bug after upgrade to MariaDB 10.3 on our service written in go. Simple go application to reproduce the problem is attached to the issue. Application will spin MariaDB server docker container and execute same query with 999 and 1000 parameters to show the issue. It will try multiple MariaDB versions. Same issue is not present in latest MySQL servers or MariaDB < 10.3.3. C proof of concept app Digging deeper into the issue I was able to reproduce it in C code. Demo code attached to the issue (builds with clang main.c -o main `mysql_config --cflags` `mysql_config --libs`). C app will not spawn any docker containers and expect MariaDB running on localhost:3306. |
| Comments |
| Comment by Alice Sherepa [ 2019-05-21 ] | |||||
|
Thanks a lot! I repeated as described, with main.c, on current 10.3,10.4 (10.3 592dc59d7a5f9bd80bffdd9d0f0) | |||||
| Comment by Julius [ 2019-09-06 ] | |||||
|
Are there any news regarding this issue? We would really appreciate if this issue were resolved. We are currently running our production databases with reduced performance because of this. All our batch queries are forcefully limited to this magic number of 999 parameters. | |||||
| Comment by Julius [ 2020-06-02 ] | |||||
|
This issue is fixed in 10.3.22 and 10.4.12
I guess fix came from | |||||
| Comment by Michael [ 2022-02-17 ] | |||||
|
We see a problem with 10.6.7 which fails with prepared statements with more than 999 parameters. | |||||
| Comment by Alice Sherepa [ 2022-03-11 ] | |||||
|
mipapo there is a regression |