Commit e72a5397 authored by unknown's avatar unknown

Merge sin.intern.azundris.com:/misc/mysql/31588/41-31588

into  sin.intern.azundris.com:/misc/mysql/31588/50-31588


sql/set_var.cc:
  Auto merged
mysql-test/r/variables.result:
  SCCS merged
mysql-test/t/variables.test:
  SCCS merged
parents a48ed6c9 52162bd3
......@@ -673,6 +673,9 @@ set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
@@query_prealloc_size = @test
1
set global sql_mode=repeat('a',80);
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
End of 4.1 tests
create table t1 (a int);
select a into @x from t1;
Warnings:
......
......@@ -535,7 +535,14 @@ set @test = @@query_prealloc_size;
set @@query_prealloc_size = @test;
select @@query_prealloc_size = @test;
# End of 4.1 tests
#
# Bug#31588 buffer overrun when setting variables
#
# Buffer-size Off By One. Should throw valgrind-warning without fix #31588.
--error 1231
set global sql_mode=repeat('a',80);
--echo End of 4.1 tests
#
# Bug#6282 Packet error with SELECT INTO
......
......@@ -1752,7 +1752,7 @@ bool sys_var::check_set(THD *thd, set_var *var, TYPELIB *enum_names)
&not_used));
if (error_len)
{
strmake(buff, error, min(sizeof(buff), error_len));
strmake(buff, error, min(sizeof(buff) - 1, error_len));
goto err;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment