1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-29 00:08:14 +03:00

A patch for Bug#11763413 (56115: SELECT doesn't work in

prepared statements with cursor protocol).

The problem was a bug in Materialized-cursor implementation.
Materialized_cursor::open() called send_result_metadata()
with items pointing to already closed table.

The fix is to send metadata when the table is still open.

NOTE: this is a "partial" fix: metadata are different with
and without --cursor-protocol, but that's a different large
problem, one indication of which is reported as Bug 24176.
This commit is contained in:
Alexander Nozdrin
2011-03-22 14:48:56 +03:00
parent 5ad3f44337
commit ae03e16b24
4 changed files with 81 additions and 29 deletions

View File

@@ -3731,5 +3731,19 @@ CREATE TABLE t1 (a INT);
BEGIN;
PREPARE stmt1 FROM "SELECT * FROM t1";
DROP TABLE t1;
#
# End of 6.0 tests.
# Bug#56115: invalid memory reads when PS selecting from
# information_schema tables
# Bug#58701: crash in Field::make_field, cursor-protocol
#
# NOTE: MTR should be run both with --ps-protocol and --cursor-protocol.
#
SELECT *
FROM (SELECT 1 UNION SELECT 2) t;
1
1
2
#
# End of 5.5 tests.