Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.2
-
None
-
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);
check_stmt_rc(mysql_stmt_execute(stmt), stmt);
mysql_stmt_execute fails. The error is
[HY000] The number of parameters in bound buffers differs from number of columns in resultset(2057)
Server version I tested against is 10.2.3
In CLI PREPARE+EXECUTE works fine
MariaDB [test]> PREPARE analyze_select FROM "ANALYZE SELECT 1";
Query OK, 0 rows affected (0.00 sec)
Statement prepared
MariaDB [test]> EXECUTE analyze_select;
|
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
|
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | r_rows | filtered | r_filtered | Extra |
|
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
|
| 1 | SIMPLE | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | NULL | No tables used |
|
+------+-------------+-------+------+---------------+------+---------+------+------+--------+----------+------------+----------------+
|
1 row in set (0.00 sec)
|
The query can be any, in fact. Unless it has 13 columns, like ANALAYZE output, but then we probably have issue with wrong metadata Yes, it seems that returned metadata is for analyzed query, and not for ANALYZE result itself.
I am not sure if that is not error in the server. In fact I'd imagine that is more probable
Attachments
Issue Links
- relates to
-
MDEV-11975 SQLCOM_PREPARE of EXPLAIN & ANALYZE statement do not return correct metadata info
- Closed