[Maria-developers] Rev 2752: Subquery optimization: Duplicate Elimination: process in file:///home/psergey/dev/maria-5.3-subqueries-r3/
At file:///home/psergey/dev/maria-5.3-subqueries-r3/ ------------------------------------------------------------ revno: 2752 revision-id: psergey@askmonty.org-20100208125530-l0o01n6lxk95cn78 parent: psergey@askmonty.org-20100208095616-ar502xdhoqqhe3nk committer: Sergey Petrunya <psergey@askmonty.org> branch nick: maria-5.3-subqueries-r3 timestamp: Mon 2010-02-08 14:55:30 +0200 message: Subquery optimization: Duplicate Elimination: process temporary table overflow correctly. === modified file 'sql/sql_select.cc' --- a/sql/sql_select.cc 2010-01-28 13:48:33 +0000 +++ b/sql/sql_select.cc 2010-02-08 12:55:30 +0000 @@ -16250,12 +16250,12 @@ if (error) { /* create_internal_tmp_table_from_heap will generate error if needed */ - if (sjtbl->tmp_table->file->is_fatal_error(error, HA_CHECK_DUP) && - create_internal_tmp_table_from_heap(thd, sjtbl->tmp_table, + if (!sjtbl->tmp_table->file->is_fatal_error(error, HA_CHECK_DUP)) + DBUG_RETURN(1); /* Duplicate */ + if (create_internal_tmp_table_from_heap(thd, sjtbl->tmp_table, sjtbl->start_recinfo, &sjtbl->recinfo, error, 1)) DBUG_RETURN(-1); - DBUG_RETURN(1); } DBUG_RETURN(0); }
Hi!
"Sergey" == Sergey Petrunya <psergey@askmonty.org> writes:
Sergey> At file:///home/psergey/dev/maria-5.3-subqueries-r3/ Sergey> ------------------------------------------------------------ Sergey> revno: 2752 Sergey> revision-id: psergey@askmonty.org-20100208125530-l0o01n6lxk95cn78 Sergey> parent: psergey@askmonty.org-20100208095616-ar502xdhoqqhe3nk Sergey> committer: Sergey Petrunya <psergey@askmonty.org> Sergey> branch nick: maria-5.3-subqueries-r3 Sergey> timestamp: Mon 2010-02-08 14:55:30 +0200 Sergey> message: Sergey> Subquery optimization: Duplicate Elimination: process Sergey> temporary table overflow correctly. Sergey> === modified file 'sql/sql_select.cc' Sergey> --- a/sql/sql_select.cc 2010-01-28 13:48:33 +0000 Sergey> +++ b/sql/sql_select.cc 2010-02-08 12:55:30 +0000 Sergey> @@ -16250,12 +16250,12 @@ Sergey> if (error) Sergey> { Sergey> /* create_internal_tmp_table_from_heap will generate error if needed */ Sergey> - if (sjtbl->tmp_table->file->is_fatal_error(error, HA_CHECK_DUP) && Sergey> - create_internal_tmp_table_from_heap(thd, sjtbl->tmp_table, Sergey> + if (!sjtbl->tmp_table->file->is_fatal_error(error, HA_CHECK_DUP)) Sergey> + DBUG_RETURN(1); /* Duplicate */ Sergey> + if (create_internal_tmp_table_from_heap(thd, sjtbl->tmp_table, Sergey> sjtbl->start_recinfo, Sergey> &sjtbl->recinfo, error, 1)) Sergey> DBUG_RETURN(-1); Why -1 here ? (Tried to check this code in 5.1 tree, but it's not yet pushed so I couldn't check this myself) Regards, Monty
participants (2)
-
Michael Widenius
-
Sergey Petrunya