Hi Tor,
On 1/27/11 1:12 PM, Tor Didriksen wrote:
> #At file:///export/home/didrik/repo/trunk-sortaborted/ based on
> revid:anitha.gopi@stripped
>
> 3559 Tor Didriksen 2011-01-27
> Bug #36022 please log more information about "Sort aborted" queries
>
> Write an additional warning message to the server log,
> explaining why a sort operation is aborted.
>
> The output in mysqld.err will look something like:
> 110127 15:07:54 [ERROR] mysqld: Sort aborted: Out of memory (Needed 24 bytes)
> 110127 15:07:54 [ERROR] mysqld: Out of sort memory, consider increasing server
> sort buffer size
> 110127 15:07:54 [ERROR] mysqld: Sort aborted: Out of sort memory, consider
> increasing server sort buffer size
> 110127 15:07:54 [ERROR] mysqld: Sort aborted: Incorrect number of arguments
> for FUNCTION test.f1; expected 0, got 1
Patch approved, thanks for working on this! Some minor comments below.
[...]
>
> === modified file 'mysql-test/include/mtr_warnings.sql'
> --- a/mysql-test/include/mtr_warnings.sql 2010-11-29 11:28:55 +0000
> +++ b/mysql-test/include/mtr_warnings.sql 2011-01-27 12:12:18 +0000
> @@ -188,9 +188,6 @@ INSERT INTO global_suppressions VALUES
> /*It will print a warning if a new UUID of server is generated.*/
> ("No existing UUID has been found, so we assume that this is the first time that
> this server has been started.*"),
>
> - /* Test case for Bug#31590 in order_by.test produces the following error */
> - ("Out of sort memory; increase server sort buffer size"),
> /* Special case for Bug #26402 in show_check.test
> - Question marks are not valid file name parts on Windows. Ignore
> this error message.
>
> === modified file 'mysql-test/include/order_by.inc'
> --- a/mysql-test/include/order_by.inc 2010-12-17 09:41:21 +0000
> +++ b/mysql-test/include/order_by.inc 2011-01-27 12:12:18 +0000
> @@ -843,7 +843,8 @@ create table t1(a int, b tinytext);
> insert into t1 values (1,2),(3,2);
> set session sort_buffer_size= 30000;
> set session max_sort_length= 2180;
> ---error 1038
> +CALL mtr.add_suppression("Out of sort memory");
Very nice.
> +--error ER_OUT_OF_SORTMEMORY
> select * from t1 order by b;
> drop table t1;
>
>
[...]
>
> === modified file 'sql/filesort.cc'
> --- a/sql/filesort.cc 2011-01-11 09:09:21 +0000
> +++ b/sql/filesort.cc 2011-01-27 12:12:18 +0000
> @@ -356,8 +356,24 @@ ha_rows filesort(THD *thd, TABLE *table,
> }
> }
> if (error)
> - my_message(ER_FILSORT_ABORT, ER(ER_FILSORT_ABORT),
> - MYF(ME_ERROR+ME_WAITTANG));
> + {
> + DBUG_ASSERT(thd->stmt_da->status() == Diagnostics_area::DA_ERROR);
> + my_printf_error(ER_FILSORT_ABORT,
> + "%s: %s",
> + MYF(ME_ERROR + ME_WAITTANG),
> + ER_THD(thd, ER_FILSORT_ABORT),
> + thd->stmt_da->message());
> +
> + if (global_system_variables.log_warnings> 1)
> + {
> + sql_print_warning("%s, host:%s, user:%s, thread: %lu, query: %-.4096s",
Suggest to always add space after the colon.
[...]
> === modified file 'sql/share/errmsg-utf8.txt'
> --- a/sql/share/errmsg-utf8.txt 2010-12-05 22:51:49 +0000
> +++ b/sql/share/errmsg-utf8.txt 2011-01-27 12:12:18 +0000
> @@ -897,7 +897,7 @@ ER_OUT_OF_SORTMEMORY HY001 S1001
> cze "M-Bálo paměti pro třídění. Zvyšte
> velikost třídícího bufferu"
> dan "Ikke mere sorteringshukommelse. Øg sorteringshukommelse (sort
> buffer size) for serveren"
> nla "Geen geheugen om te sorteren. Verhoog de server sort buffer size"
> - eng "Out of sort memory; increase server sort buffer size"
> + eng "Out of sort memory, consider increasing server sort buffer size"
I checked with the documentation team and it should be fine to preserve
the translations since the meaning is not changing that much.
In any case, the Portuguese translation can be improved:
"Não há memória suficiente para ordenação. Considere
aumentar o tamanho
do retentor (buffer) de ordenação."
Regards,
Davi