Commit dbdca81c authored by unknown's avatar unknown

Final patch for WL#1600(warn if max_allowed_packet used)


mysql-test/r/func_str.result:
  test fixed
mysql-test/r/packet.result:
  test fixed
sql/item_geofunc.cc:
  error message fixed
sql/item_strfunc.cc:
  error message fixed
sql/share/czech/errmsg.txt:
  error message fixed
sql/share/danish/errmsg.txt:
  error message fixed
sql/share/dutch/errmsg.txt:
  error message fixed
sql/share/english/errmsg.txt:
  error message fixed
sql/share/estonian/errmsg.txt:
  error message fixed
sql/share/french/errmsg.txt:
  error message fixed
sql/share/german/errmsg.txt:
  error message fixed
sql/share/greek/errmsg.txt:
  error message fixed
sql/share/hungarian/errmsg.txt:
  error message fixed
sql/share/italian/errmsg.txt:
  error message fixed
sql/share/japanese/errmsg.txt:
  error message fixed
sql/share/korean/errmsg.txt:
  error message fixed
sql/share/norwegian-ny/errmsg.txt:
  error message fixed
sql/share/norwegian/errmsg.txt:
  error message fixed
sql/share/polish/errmsg.txt:
  error message fixed
sql/share/portuguese/errmsg.txt:
  error message fixed
sql/share/romanian/errmsg.txt:
  error message fixed
sql/share/russian/errmsg.txt:
  error message fixed
sql/share/serbian/errmsg.txt:
  error message fixed
sql/share/slovak/errmsg.txt:
  error message fixed
sql/share/spanish/errmsg.txt:
  error message fixed
sql/share/swedish/errmsg.txt:
  error message fixed
sql/share/ukrainian/errmsg.txt:
  error message fixed
parent 291fec68
......@@ -226,7 +226,7 @@ select length(repeat("a",100000000)),length(repeat("a",1000*64));
length(repeat("a",100000000)) length(repeat("a",1000*64))
NULL 64000
Warnings:
Warning 1300 Data truncated by function 'repeat' do to max_allowed_packet
Warning 1301 Result of repeat() was larger than max_allowed_packet (1048576) - truncated
select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("sql" in ("mysql"));
position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql"))
1 0 3
......
......@@ -9,7 +9,7 @@ select repeat('a',2000);
repeat('a',2000)
NULL
Warnings:
Warning 1300 Data truncated by function 'repeat' do to max_allowed_packet
Warning 1301 Result of repeat() was larger than max_allowed_packet (1024) - truncated
select @@net_buffer_length, @@max_allowed_packet;
@@net_buffer_length @@max_allowed_packet
1024 1024
......
......@@ -449,7 +449,8 @@ String *Item_func_spatial_collection::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto err;
}
......
......@@ -269,7 +269,8 @@ String *Item_func_concat::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name(),
current_thd->variables.max_allowed_packet);
goto null;
}
if (res->alloced_length() >= res->length()+res2->length())
......@@ -552,7 +553,8 @@ String *Item_func_concat_ws::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name(),
current_thd->variables.max_allowed_packet);
goto null;
}
if (res->alloced_length() >=
......@@ -815,7 +817,8 @@ String *Item_func_replace::val_str(String *str)
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name());
func_name(),
current_thd->variables.max_allowed_packet);
goto null;
}
......@@ -842,7 +845,8 @@ String *Item_func_replace::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name(),
current_thd->variables.max_allowed_packet);
goto null;
}
if (!alloced)
......@@ -907,7 +911,8 @@ String *Item_func_insert::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto null;
}
res=copy_if_not_alloced(str,res,res->length());
......@@ -1964,7 +1969,8 @@ String *Item_func_repeat::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto err;
}
tot_length= length*(uint) count;
......@@ -2035,7 +2041,8 @@ String *Item_func_rpad::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto err;
}
if(args[2]->null_value || !pad_char_length)
......@@ -2121,7 +2128,8 @@ String *Item_func_lpad::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto err;
}
......@@ -2415,7 +2423,8 @@ String *Item_load_file::val_str(String *str)
{
push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_WARN_ALLOWED_PACKET_OVERFLOWED,
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED), func_name());
ER(ER_WARN_ALLOWED_PACKET_OVERFLOWED),
func_name(), current_thd->variables.max_allowed_packet);
goto err;
}
if (tmp_value.alloc(stat_info.st_size))
......
......@@ -313,3 +313,4 @@ character-set=latin2
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -307,3 +307,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -315,3 +315,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -308,3 +308,4 @@ character-set=latin7
"Got temporary error %d '%-.100s' from %s",
"Unknown or incorrect time zone: '%-.64s'",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -316,3 +316,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=greek
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=latin2
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=ujis
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=euckr
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -308,3 +308,4 @@ character-set=latin2
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -305,3 +305,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -308,3 +308,4 @@ character-set=latin2
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=koi8r
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -310,3 +310,4 @@ character-set=cp1250
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -312,3 +312,4 @@ character-set=latin2
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -306,3 +306,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -304,3 +304,4 @@ character-set=latin1
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
......@@ -309,3 +309,4 @@ character-set=koi8u
"Unknown or incorrect time zone: '%-.64s'",
"Invalid TIMESTAMP value in column '%s' at row %ld",
"Invalid %s character string: '%.64s'",
"Result of %s() was larger than max_allowed_packet (%d) - truncated"
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