[MDEV-10657] incorrect result returned with binary protocol (prepared statements) Created: 2016-08-24 Updated: 2017-12-27 Resolved: 2017-12-27 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements |
| Affects Version/s: | 5.5, 10.0, 10.1, 10.2 |
| Fix Version/s: | 5.5.59, 10.0.34, 10.2.12, 10.3.4, 10.1.31 |
| Type: | Bug | Priority: | Major |
| Reporter: | Oleksandr Byelkin | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.11, 10.2.12 | ||||||||
| Description |
|
runnig following test suite with and without --ps-protocol produce different results.
normal execution:
with --ps-protocol:
|
| Comments |
| Comment by Diego Dupin [ 2016-08-24 ] |
|
to reproduced it easily on heidi with a query a little simpler: prepare test from "SELECT * FROM (SELECT * FROM (SELECT seq FROM seq_1_to_3, (SELECT @cnt := 0) C) T) X"; will be : 3 |
| Comment by Oleksandr Byelkin [ 2017-11-13 ] |
|
OK, sequences appeared later than 5.5, but the bug present in 5.5 so the first test suite sill in use |
| Comment by Oleksandr Byelkin [ 2017-11-14 ] |
|
there is no diferences in Item_func_set_user_var::update calls. |
| Comment by Oleksandr Byelkin [ 2017-12-18 ] |
|
The difference is that in binary protocol fields of table T instaed of X somehow used. |
| Comment by Oleksandr Byelkin [ 2017-12-19 ] |
|
Prepare decide to merge X, then execution to materialize X. |
| Comment by Oleksandr Byelkin [ 2017-12-19 ] |
|
During statement prepare unit->prepared is set for X and so translation table created. |
| Comment by Oleksandr Byelkin [ 2017-12-20 ] |
|
Github tree: bb-5.5- revision-id: 24b4585ad0648f21519f47a04762e1b208918749 (mariadb-5.5.58-18-g24b4585ad06)
If translation table present when we materialize the derived table then Added debug info to see really what happens with what derived. |
| Comment by Igor Babaev [ 2017-12-24 ] |
|
Sanja, see your email with my review. |