[MDEV-4978] Server cursor is broken with blobs in the select list, ORDER BY does not work Created: 2013-09-02 Updated: 2013-09-10 Resolved: 2013-09-06 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | 10.0.4, 5.5.32, 5.1.67, 5.2.14, 5.3.12 |
| Fix Version/s: | 5.5.33, 10.0.6, 5.1.73, 5.2.15, 5.3.13 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Elena Stepanova | Assignee: | Sergey Vojtovich |
| Resolution: | Fixed | Votes: | 1 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Description |
|
Initially reported at Maria-discuss (https://lists.launchpad.net/maria-discuss/msg00986.html) Paul J Stevens wrote:
The original test case by Paul can be found in the mailing list.
It returns
which is obviously a wrong order. |
| Comments |
| Comment by Arjen Lentz [ 2013-09-03 ] |
|
How does stock MySQL get on with this test code? |
| Comment by Elena Stepanova [ 2013-09-03 ] |
|
Stock MySQL returns the correct result, both on Paul's original test case and on the simplified one. |
| Comment by Sergey Vojtovich [ 2013-09-05 ] |
|
Even more simplified mtr test case: CREATE TABLE t1(a INT, b BLOB); DELIMITER |; CALL p1; DROP PROCEDURE p1; |
| Comment by Sergey Vojtovich [ 2013-09-05 ] |
|
The difference with stock MySQL is that MariaDB uses MARIA storage engine for temporary tables, which seem to shuffle records: CREATE TABLE t1(a INT, b BLOB) ENGINE=MyISAM; CREATE TABLE t1(a INT, b BLOB) ENGINE=MARIA; |
| Comment by Reindl Harald [ 2013-09-05 ] |
|
well, no wonder that it works faster if it skips the most important things of a RDBMS which are reliability - may I ask why such basic operations like "order by" are not covered by any of the auto-tests? |
| Comment by Elena Stepanova [ 2013-09-05 ] |
|
@ Reindl Harald Why do you think that "basic operations like order by" are not covered by auto-tests? The test case might look basic to you, because it's a result of simplification and further analysis; but in fact it represents a very particular situation.The numbers in the test are not purely random. Replace 805 with 800, and you won't get the failure. Replace 805 with 9805 – same story; etc. No tests will ever imitate all possible combinations of real-life data. We needed an original erroneous scenario from someone who did hit the problem. Thanks to Paul J Stevens, we got it, so now it will be fixed. Also, "shuffle" does not necessarily mean "skip ordering", at the very least you should wait for the real fix and check it to be able to claim that the performance advantage was caused by this bug. |
| Comment by Reindl Harald [ 2013-09-05 ] |
|
maybe i sounded too rough - i was the guy treated Paul two days by testing dbmail-3.1, punsihed him all the time with the same test-message until we realized that he did not understand me because the problem did not exist and he realized after screenshots "ok, wait, a year ago MariaDB did not pass basic tests" these things happened after both of the two of us worked day and night for weeks on other issues well, by realize this now possible my life has been saved because in doubt i can cacnel the calendar entry on 2013/10/01 switch production to MariaDB after now have MySQL 5.5.33 on fedora 19 without all the mess Oracle did to the official Fedora packages by bring back their "community-mysql" |
| Comment by Sergey Vojtovich [ 2013-09-06 ] |
|
Sergei, please review fix for this issue. |
| Comment by Sergey Vojtovich [ 2013-09-06 ] |
|
Fixed in 5.5.33, revision-id: svoj@mariadb.org-20130906115919-w1xbf99iuyz82c8m |
| Comment by Reindl Harald [ 2013-09-06 ] |
|
sounds good - thank you very much! is there some place where i can get a replacement for mariadb-5.5.32.tar.gz in conext |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
You can download the packages from here http://hasky.askmonty.org/archive/pack/5.5/build-4167/ |
| Comment by Antonio Fernandes [ 2013-09-06 ] |
|
Sorry for being such a newbie and a bit off topic but I've been tracking buildbot from MariaDB and, until now, never knew there were available to download builds... for example (since affects me), where is stored http://buildbot.askmonty.org/buildbot/builders/kvm-tarbake-jaunty-x86/builds/4169? Thank you for great work (I've replaced MySQL when sub-queries were awful - MySQL 5.5 series)! |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
It is being built now, but when the packages are baked, they'll be available at http://hasky.askmonty.org/archive/pack/5.5/build-4169/ |
| Comment by Elena Stepanova [ 2013-09-06 ] |
|
Please note that intermediate builds can have temporary regressions, please use them with caution. |
| Comment by Reindl Harald [ 2013-09-07 ] |
|
the intermediate build (from source) solves the dbmail-problem at least with the message who went the upstream-developer and me crazy for broader tests we will wait for 5.5.33 - after MySQL 5.5.33 is out for some time now and this bug is really serious i expect the release in a not so long future - after that we will verify dbmail again with unit-tests again MariaDB which hopefully will be an option for production |