[MDEV-11966] Impossible to execute prepared ANALYZE SELECT Created: 2017-02-01 Updated: 2019-03-12 Resolved: 2017-03-09 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Prepared Statements |
| Affects Version/s: | 10.2.2 |
| Fix Version/s: | 10.2.5 |
| Type: | Bug | Priority: | Major |
| Reporter: | Lawrin Novitsky | Assignee: | Oleksandr Byelkin |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 10.2.5-1 | ||||||||
| Description |
|
It's very easy to repeat the problem check_stmt_rc(mysql_stmt_prepare(stmt, "ANALYZE SELECT 1", -1), stmt); mysql_stmt_execute fails. The error is Server version I tested against is 10.2.3 In CLI PREPARE+EXECUTE works fine
The query can be any, in fact. Unless it has 13 columns, like ANALAYZE output, but then we probably have issue with wrong metadata I am not sure if that is not error in the server. In fact I'd imagine that is more probable |
| Comments |
| Comment by Georg Richter [ 2017-02-01 ] |
|
After preparing the statement ANALYZE SELECT 1 the function mysql_stmt_field_count() returns 1 instead of 13. |
| Comment by Oleksandr Byelkin [ 2017-02-01 ] |
|
It looks like EXPLAIN also return wrong number - 0. |
| Comment by Oleksandr Byelkin [ 2017-02-02 ] |
|
there is processing of EXPLAIN In the set_sql_prepare() but nothing for ANALYSE. And both looks like returning wrong info (EXPLAIN do not report info). |
| Comment by Lawrin Novitsky [ 2017-02-05 ] |
|
Looks like the fix works |
| Comment by Oleksandr Byelkin [ 2017-03-07 ] |
|
revision-id: 0f3c1f771011c432698f3e330b5aec522591be41 (mariadb-10.2.3-153-g0f3c1f77101)
Prepare os ANALYZE now respond as EXPLAIN. — |
| Comment by Oleksandr Byelkin [ 2017-03-08 ] |
|
revision-id: c544bba6d7c2c400a288a3d2f468d4f0e84d3908 (mariadb-10.2.4-28-gc544bba)
Prepare os ANALYZE now respond as EXPLAIN. — |
| Comment by Oleksandr Byelkin [ 2017-03-08 ] |
|
github branch bb-10.2- |
| Comment by Sergei Petrunia [ 2017-03-09 ] |
|
Ok to push |