[MDEV-9347] Not all rows returned by the C API Created: 2015-12-30 Updated: 2016-01-27 Resolved: 2016-01-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Optimizer, Storage Engine - Aria |
| Affects Version/s: | 10.1 |
| Fix Version/s: | 10.1.11 |
| Type: | Bug | Priority: | Major |
| Reporter: | Tim Van den Eynde | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
Linux x64 |
||
| Attachments: |
|
| Sprint: | 10.1.11 |
| Description |
|
We noticed after upgrading from MySQL 5.5 to MariaDB 10.1 that looping over a table through the C API doesn't return all rows. It only happens on a sufficiently large table. Attached is a small Python script which produces such a table, and a C program that triggers the bug. Running make will compile the C file and produce a file setup.sql which you can import in your database. When it is imported, MYSQLPASSWORD= ./main -s (other flags might be needed, see ./main -h) shows the number of rows received, which should of course agree with SELECT COUNT(*) FROM foo; from the mysql client. We have bisected the issue to this commit: https://github.com/MariaDB/server/commit/7a387c01586ae5107f2c2c64d3cdd420de83e168 |
| Comments |
| Comment by Sergei Golubchik [ 2016-01-24 ] | ||||||||
|
What happens here:
| ||||||||
| Comment by Michael Widenius [ 2016-01-27 ] | ||||||||
|
roblem was that insert-order (enforced by the optimizer) did not handle the case where the bitmap changed to a new one. Fixed by remembering the last bitmap page used and to force usage of this when inserting new rows | ||||||||
| Comment by Michael Widenius [ 2016-01-27 ] | ||||||||
|
Fix pushed |