From bbc9e57981d8aa420d7bcf58e3fb2d7c1bf25ca9 Mon Sep 17 00:00:00 2001 From: Sergey Vojtovich Date: Fri, 6 Sep 2013 15:59:19 +0400 Subject: MDEV-4978 - Server cursor is broken with blobs in the select list, ORDER BY does not work Use "dynamic" row format (instead of "block") for MARIA internal temporary tables created for cursors. With "block" row format MARIA may shuffle rows, with "dynamic" row format records are inserted sequentially (there are no gaps in data file while we fill temporary tables). This is needed to preserve row order when scanning materialized cursors. --- sql/sql_cursor.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sql_cursor.cc') diff --git a/sql/sql_cursor.cc b/sql/sql_cursor.cc index 3758bf27819..230a8b2c802 100644 --- a/sql/sql_cursor.cc +++ b/sql/sql_cursor.cc @@ -389,7 +389,7 @@ bool Select_materialize::send_result_set_metadata(List &list, uint flags) if (create_result_table(unit->thd, unit->get_unit_column_types(), FALSE, thd->variables.option_bits | TMP_TABLE_ALL_COLUMNS, - "", FALSE, TRUE)) + "", FALSE, TRUE, TRUE)) return TRUE; materialized_cursor= new (&table->mem_root) -- cgit v1.2.1