Commit 05b9e4fc authored by unknown's avatar unknown

Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE

  -issue more correct message for incorrect date|datetime|time values
  -ER_WARN_DATA_OUT_OF_RANGE message is changed
  -added new error message


mysql-test/r/auto_increment.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/bigint.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ctype_ucs.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/date_formats.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_sapdb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_str.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/func_time.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/insert.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/loaddata.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/mysqldump.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_2myisam.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_3innodb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_4heap.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_5merge.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_6bdb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/ps_7ndb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/rpl_rewrite_db.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/sp.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/strict.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/timezone2.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/timezone_grant.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_bit.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_bit_innodb.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_date.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_datetime.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_decimal.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_float.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_newdecimal.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_ranges.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_time.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/type_uint.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/view.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
mysql-test/r/warnings.result:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    result change
sql/share/errmsg.txt:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    -ER_WARN_DATA_OUT_OF_RANGE message is changed
    -added new error message
sql/time.cc:
  Fix for bug#8294 Traditional: Misleading error message for invalid CAST to DATE
    issue more correct message for incorrect date|datetime|time values
parent b8b67f66
......@@ -163,7 +163,7 @@ last_insert_id()
255
insert into t1 set i = null;
Warnings:
Warning 1264 Out of range value adjusted for column 'i' at row 1
Warning 1264 Out of range value for column 'i' at row 1
select last_insert_id();
last_insert_id()
255
......
......@@ -47,7 +47,7 @@ drop table t1;
create table t1 ( a int not null default 1, big bigint );
insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(18446744073709551615);
Warnings:
Warning 1264 Out of range value adjusted for column 'big' at row 4
Warning 1264 Out of range value for column 'big' at row 4
select * from t1;
a big
1 -1
......@@ -62,7 +62,7 @@ min(big) max(big) max(big)-1
-1 9223372036854775807 9223372036854775806
alter table t1 modify big bigint unsigned not null;
Warnings:
Warning 1264 Out of range value adjusted for column 'big' at row 1
Warning 1264 Out of range value for column 'big' at row 1
select min(big),max(big),max(big)-1 from t1;
min(big) max(big) max(big)-1
0 9223372036854775807 9223372036854775806
......@@ -92,7 +92,7 @@ min(big) max(big) max(big)-1
0 18446744073709551615 18446744073709551614
alter table t1 modify big bigint not null;
Warnings:
Warning 1264 Out of range value adjusted for column 'big' at row 5
Warning 1264 Out of range value for column 'big' at row 5
select * from t1;
a big
1 0
......@@ -204,10 +204,10 @@ drop table t1;
create table t1 ( quantity decimal(2) unsigned);
insert into t1 values (500), (-500), (~0), (-1);
Warnings:
Warning 1264 Out of range value adjusted for column 'quantity' at row 1
Warning 1264 Out of range value adjusted for column 'quantity' at row 2
Warning 1264 Out of range value adjusted for column 'quantity' at row 3
Warning 1264 Out of range value adjusted for column 'quantity' at row 4
Warning 1264 Out of range value for column 'quantity' at row 1
Warning 1264 Out of range value for column 'quantity' at row 2
Warning 1264 Out of range value for column 'quantity' at row 3
Warning 1264 Out of range value for column 'quantity' at row 4
select * from t1;
quantity
99
......
......@@ -671,7 +671,7 @@ DROP TABLE t1;
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
INSERT INTO t1 VALUES ('-1');
Warnings:
Warning 1264 Out of range value adjusted for column 'Field1' at row 1
Warning 1264 Out of range value for column 'Field1' at row 1
DROP TABLE t1;
SET NAMES latin1;
CREATE TABLE t1 (
......
......@@ -401,14 +401,14 @@ date format str_to_date
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
Warnings:
Warning 1292 Truncated incorrect datetime value: '10:20:10AM'
Warning 1292 Incorrect datetime value: '10:20:10AM'
select date,format,concat(str_to_date(date, format),'') as con from t1;
date format con
10:20:10AM %h:%i:%s 0000-00-00 10:20:10
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 0003-01-02 22:11:12
Warnings:
Warning 1292 Truncated incorrect datetime value: '10:20:10AM'
Warning 1292 Incorrect datetime value: '10:20:10AM'
drop table t1;
select get_format(DATE, 'USA') as a;
a
......
......@@ -68,7 +68,7 @@ select datediff("1997-11-31 23:59:59.000001","1997-12-31");
datediff("1997-11-31 23:59:59.000001","1997-12-31")
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '1997-11-31 23:59:59.000001'
Warning 1292 Incorrect datetime value: '1997-11-31 23:59:59.000001'
select datediff("1997-11-30 23:59:59.000001",null);
datediff("1997-11-30 23:59:59.000001",null)
NULL
......@@ -133,7 +133,7 @@ select timestamp("2001-13-01", "01:01:01.000001");
timestamp("2001-13-01", "01:01:01.000001")
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2001-13-01'
Warning 1292 Incorrect datetime value: '2001-13-01'
select timestamp("2001-12-01", "25:01:01");
timestamp("2001-12-01", "25:01:01")
2001-12-02 01:01:01
......@@ -153,7 +153,7 @@ select date("1997-13-31 23:59:59.000001");
date("1997-13-31 23:59:59.000001")
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '1997-13-31 23:59:59.000001'
Warning 1292 Incorrect datetime value: '1997-13-31 23:59:59.000001'
select time("1997-12-31 23:59:59.000001");
time("1997-12-31 23:59:59.000001")
23:59:59.000001
......
......@@ -837,16 +837,16 @@ drop table t1, t2;
create table t1 (c1 INT, c2 INT UNSIGNED);
insert into t1 values ('21474836461','21474836461');
Warnings:
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
Warning 1264 Out of range value for column 'c2' at row 1
insert into t1 values ('-21474836461','-21474836461');
Warnings:
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
Warning 1264 Out of range value for column 'c2' at row 1
show warnings;
Level Code Message
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value adjusted for column 'c2' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
Warning 1264 Out of range value for column 'c2' at row 1
select * from t1;
c1 c2
2147483647 4294967295
......
......@@ -311,7 +311,7 @@ select date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND);
date_sub("0000-00-00 00:00:00",INTERVAL 1 SECOND)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
select date_add('1998-01-30',Interval 1 month);
date_add('1998-01-30',Interval 1 month)
1998-02-28
......@@ -428,12 +428,12 @@ SELECT month(updated) from t1;
month(updated)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
SELECT year(updated) from t1;
year(updated)
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: ''
Warning 1292 Incorrect datetime value: ''
drop table t1;
create table t1 (d date, dt datetime, t timestamp, c char(10));
insert into t1 values ("0000-00-00", "0000-00-00", "0000-00-00", "0000-00-00");
......@@ -441,8 +441,8 @@ select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear
dayofyear("0000-00-00") dayofyear(d) dayofyear(dt) dayofyear(t) dayofyear(c)
NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1;
dayofmonth("0000-00-00") dayofmonth(d) dayofmonth(dt) dayofmonth(t) dayofmonth(c)
0 0 0 0 0
......@@ -456,8 +456,8 @@ select week("0000-00-00"),week(d),week(dt),week(t),week(c) from t1;
week("0000-00-00") week(d) week(dt) week(t) week(c)
NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
select year("0000-00-00"),year(d),year(dt),year(t),year(c) from t1;
year("0000-00-00") year(d) year(dt) year(t) year(c)
0 0 0 0 0
......@@ -465,14 +465,14 @@ select yearweek("0000-00-00"),yearweek(d),yearweek(dt),yearweek(t),yearweek(c) f
yearweek("0000-00-00") yearweek(d) yearweek(dt) yearweek(t) yearweek(c)
NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
select to_days("0000-00-00"),to_days(d),to_days(dt),to_days(t),to_days(c) from t1;
to_days("0000-00-00") to_days(d) to_days(dt) to_days(t) to_days(c)
NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Truncated incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
Warning 1292 Incorrect datetime value: '0000-00-00'
select extract(MONTH FROM "0000-00-00"),extract(MONTH FROM d),extract(MONTH FROM dt),extract(MONTH FROM t),extract(MONTH FROM c) from t1;
extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) extract(MONTH FROM t) extract(MONTH FROM c)
0 0 0 0 0
......@@ -628,7 +628,7 @@ select date_add(time,INTERVAL 1 SECOND) from t1;
date_add(time,INTERVAL 1 SECOND)
NULL
Warnings:
Warning 1264 Out of range value adjusted for column 'time' at row 1
Warning 1264 Out of range value for column 'time' at row 1
drop table t1;
select last_day('2000-02-05') as f1, last_day('2002-12-31') as f2,
last_day('2003-03-32') as f3, last_day('2003-04-01') as f4,
......@@ -637,7 +637,7 @@ last_day('2001-02-12');
f1 f2 f3 f4 f5 last_day(NULL) last_day('2001-02-12')
2000-02-29 2002-12-31 NULL 2003-04-30 2001-01-31 NULL 2001-02-28
Warnings:
Warning 1292 Truncated incorrect datetime value: '2003-03-32'
Warning 1292 Incorrect datetime value: '2003-03-32'
create table t1 select last_day('2000-02-05') as a,
from_days(to_days("960101")) as b;
describe t1;
......@@ -706,17 +706,17 @@ select last_day('2005-00-00');
last_day('2005-00-00')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-00-00'
Warning 1292 Incorrect datetime value: '2005-00-00'
select last_day('2005-00-01');
last_day('2005-00-01')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-00-01'
Warning 1292 Incorrect datetime value: '2005-00-01'
select last_day('2005-01-00');
last_day('2005-01-00')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2005-01-00'
Warning 1292 Incorrect datetime value: '2005-01-00'
select time_format('100:00:00', '%H %k %h %I %l');
time_format('100:00:00', '%H %k %h %I %l')
100 100 04 04 4
......
......@@ -157,20 +157,20 @@ f_float_3_1_u 0.0
set @value= "1e+1111111111a";
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1264 Out of range value adjusted for column 'f_double' at row 1
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_double' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_double_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 4
original_value 1e+1111111111a
......@@ -185,21 +185,21 @@ f_float_3_1_u 99.9
set @value= "-1e+1111111111a";
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1264 Out of range value adjusted for column 'f_double' at row 1
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_double' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_double_u' at row 1
Warning 1264 Out of range value for column 'f_double_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 5
original_value -1e+1111111111a
......@@ -218,12 +218,12 @@ ERROR 22007: Illegal double '1e+1111111111' value found during parsing
set @value= 1e+111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 6
original_value 1e+111
......@@ -238,13 +238,13 @@ f_float_3_1_u 99.9
set @value= -1e+111;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1264 Out of range value adjusted for column 'f_float' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_7_2' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_4_3' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_float' at row 1
Warning 1264 Out of range value for column 'f_double_7_2' at row 1
Warning 1264 Out of range value for column 'f_float_4_3' at row 1
Warning 1264 Out of range value for column 'f_double_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 7
original_value -1e+111
......@@ -272,10 +272,10 @@ f_float_3_1_u 1.0
set @value= -1;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_float_3_1_u' at row 1
Warning 1264 Out of range value for column 'f_double_u' at row 1
Warning 1264 Out of range value for column 'f_float_u' at row 1
Warning 1264 Out of range value for column 'f_double_15_1_u' at row 1
Warning 1264 Out of range value for column 'f_float_3_1_u' at row 1
select * from t1 where number =last_insert_id();
number 9
original_value -1
......
......@@ -43,9 +43,9 @@ drop table t1;
create table t1 (a int, b char(10));
load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 3
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
Warning 1264 Out of range value adjusted for column 'a' at row 5
Warning 1264 Out of range value for column 'a' at row 5
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
select * from t1;
a b
......@@ -57,7 +57,7 @@ a b
truncate table t1;
load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
Warning 1261 Row 4 doesn't contain data for all columns
select * from t1;
a b
......
......@@ -33,7 +33,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a double);
INSERT INTO t1 VALUES ('-9e999999');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
CREATE TABLE `t1` (
`a` double default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -67,9 +67,9 @@ drop table t1;
create table t1 (a int, b char(10));
load data infile '../../std_data/loaddata3.dat' into table t1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 3
Warning 1262 Row 3 was truncated; it contained more data than there were input columns
Warning 1264 Out of range value adjusted for column 'a' at row 5
Warning 1264 Out of range value for column 'a' at row 5
Warning 1262 Row 5 was truncated; it contained more data than there were input columns
select * from rewrite.t1;
a b
......@@ -81,7 +81,7 @@ a b
truncate table t1;
load data infile '../../std_data/loaddata4.dat' into table t1 fields terminated by '' enclosed by '' lines terminated by '' ignore 1 lines;
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
Warning 1261 Row 4 doesn't contain data for all columns
select * from rewrite.t1;
a b
......
......@@ -1674,7 +1674,7 @@ drop procedure bug2776_2|
create table t3 (s1 smallint)|
insert into t3 values (123456789012)|
Warnings:
Warning 1264 Out of range value adjusted for column 's1' at row 1
Warning 1264 Out of range value for column 's1' at row 1
drop procedure if exists bug2780|
create procedure bug2780()
begin
......
This diff is collapsed.
......@@ -117,9 +117,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1969-12-31 23:59:59'),
('1970-01-01 00:00:00'),('1970-01-01 00:00:01'),
('2037-12-31 23:59:59'),('2038-01-01 00:00:00');
Warnings:
Warning 1264 Out of range value adjusted for column 'ts' at row 2
Warning 1264 Out of range value adjusted for column 'ts' at row 3
Warning 1264 Out of range value adjusted for column 'ts' at row 6
Warning 1264 Out of range value for column 'ts' at row 2
Warning 1264 Out of range value for column 'ts' at row 3
Warning 1264 Out of range value for column 'ts' at row 6
select * from t1;
ts
0000-00-00 00:00:00
......@@ -134,9 +134,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 00:30:00'),
('1970-01-01 01:00:00'),('1970-01-01 01:00:01'),
('2038-01-01 00:59:59'),('2038-01-01 01:00:00');
Warnings:
Warning 1264 Out of range value adjusted for column 'ts' at row 2
Warning 1264 Out of range value adjusted for column 'ts' at row 3
Warning 1264 Out of range value adjusted for column 'ts' at row 6
Warning 1264 Out of range value for column 'ts' at row 2
Warning 1264 Out of range value for column 'ts' at row 3
Warning 1264 Out of range value for column 'ts' at row 6
select * from t1;
ts
0000-00-00 00:00:00
......@@ -151,9 +151,9 @@ insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 01:00:00'),
('1970-01-01 01:30:00'),('1970-01-01 01:30:01'),
('2038-01-01 01:29:59'),('2038-01-01 01:30:00');
Warnings:
Warning 1264 Out of range value adjusted for column 'ts' at row 2
Warning 1264 Out of range value adjusted for column 'ts' at row 3
Warning 1264 Out of range value adjusted for column 'ts' at row 6
Warning 1264 Out of range value for column 'ts' at row 2
Warning 1264 Out of range value for column 'ts' at row 3
Warning 1264 Out of range value for column 'ts' at row 6
select * from t1;
ts
0000-00-00 00:00:00
......
......@@ -38,7 +38,7 @@ select convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC');
convert_tz('2004-11-31 12:00:00', 'Europe/Moscow', 'UTC')
NULL
Warnings:
Warning 1292 Truncated incorrect datetime value: '2004-11-31 12:00:00'
Warning 1292 Incorrect datetime value: '2004-11-31 12:00:00'
select convert_tz(b, 'Europe/Moscow', 'UTC') from t1;
convert_tz(b, 'Europe/Moscow', 'UTC')
update t1, t2 set t1.b = convert_tz('2004-11-30 12:00:00', 'Europe/Moscow', 'UTC')
......
......@@ -62,7 +62,7 @@ drop table t1;
create table t1 (a bit);
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
select hex(a) from t1;
hex(a)
0
......@@ -76,7 +76,7 @@ drop table t1;
create table t1 (a bit(2));
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
select a+0 from t1;
a+0
0
......@@ -461,7 +461,7 @@ drop table t1;
create table t1 (a bit(8)) engine=heap;
insert into t1 values ('1111100000');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
select a+0 from t1;
a+0
255
......
......@@ -62,7 +62,7 @@ drop table t1;
create table t1 (a bit) engine=innodb;
insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
select hex(a) from t1;
hex(a)
0
......@@ -76,7 +76,7 @@ drop table t1;
create table t1 (a bit(2)) engine=innodb;
insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
select a+0 from t1;
a+0
0
......
......@@ -99,7 +99,7 @@ DROP TABLE t1, t2, t3;
CREATE TABLE t1 (y YEAR);
INSERT INTO t1 VALUES ('abc');
Warnings:
Warning 1264 Out of range value adjusted for column 'y' at row 1
Warning 1264 Out of range value for column 'y' at row 1
SELECT * FROM t1;
y
0000
......
......@@ -52,7 +52,7 @@ t
truncate table t1;
insert into t1 values("2003-0303 12:13:14");
Warnings:
Warning 1264 Out of range value adjusted for column 't' at row 1
Warning 1264 Out of range value for column 't' at row 1
select * from t1;
t
0000-00-00 00:00:00
......@@ -113,12 +113,12 @@ create table t1 (t datetime);
insert into t1 values (20030102030460),(20030102036301),(20030102240401),
(20030132030401),(20031302030401),(100001202030401);
Warnings:
Warning 1264 Out of range value adjusted for column 't' at row 1
Warning 1264 Out of range value adjusted for column 't' at row 2
Warning 1264 Out of range value adjusted for column 't' at row 3
Warning 1264 Out of range value adjusted for column 't' at row 4
Warning 1264 Out of range value adjusted for column 't' at row 5
Warning 1264 Out of range value adjusted for column 't' at row 6
Warning 1264 Out of range value for column 't' at row 1
Warning 1264 Out of range value for column 't' at row 2
Warning 1264 Out of range value for column 't' at row 3
Warning 1264 Out of range value for column 't' at row 4
Warning 1264 Out of range value for column 't' at row 5
Warning 1264 Out of range value for column 't' at row 6
select * from t1;
t
0000-00-00 00:00:00
......@@ -132,12 +132,12 @@ insert into t1 values
("2003-01-02 03:04:60"),("2003-01-02 03:63:01"),("2003-01-02 24:04:01"),
("2003-01-32 03:04:01"),("2003-13-02 03:04:01"), ("10000-12-02 03:04:00");
Warnings:
Warning 1264 Out of range value adjusted for column 't' at row 1
Warning 1264 Out of range value adjusted for column 't' at row 2
Warning 1264 Out of range value adjusted for column 't' at row 3
Warning 1264 Out of range value adjusted for column 't' at row 4
Warning 1264 Out of range value adjusted for column 't' at row 5
Warning 1264 Out of range value adjusted for column 't' at row 6
Warning 1264 Out of range value for column 't' at row 1
Warning 1264 Out of range value for column 't' at row 2
Warning 1264 Out of range value for column 't' at row 3
Warning 1264 Out of range value for column 't' at row 4
Warning 1264 Out of range value for column 't' at row 5
Warning 1264 Out of range value for column 't' at row 6
select * from t1;
t
0000-00-00 00:00:00
......@@ -149,8 +149,8 @@ t
delete from t1;
insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer");
Warnings:
Warning 1264 Out of range value adjusted for column 't' at row 1
Warning 1264 Out of range value adjusted for column 't' at row 2
Warning 1264 Out of range value for column 't' at row 1
Warning 1264 Out of range value for column 't' at row 2
select * from t1;
t
0000-00-00 00:00:00
......
This diff is collapsed.
......@@ -24,8 +24,8 @@ f1 float NULL YES NULL #
f2 double NULL YES NULL #
insert into t1 values(10,10),(1e+5,1e+5),(1234567890,1234567890),(1e+10,1e+10),(1e+15,1e+15),(1e+20,1e+20),(1e+50,1e+50),(1e+150,1e+150);
Warnings:
Warning 1264 Out of range value adjusted for column 'f1' at row 7
Warning 1264 Out of range value adjusted for column 'f1' at row 8
Warning 1264 Out of range value for column 'f1' at row 7
Warning 1264 Out of range value for column 'f1' at row 8
insert into t1 values(-10,-10),(1e-5,1e-5),(1e-10,1e-10),(1e-15,1e-15),(1e-20,1e-20),(1e-50,1e-50),(1e-150,1e-150);
select * from t1;
f1 f2
......@@ -149,7 +149,7 @@ create table t1 (d1 double, d2 double unsigned);
insert into t1 set d1 = -1.0;
update t1 set d2 = d1;
Warnings:
Warning 1264 Out of range value adjusted for column 'd2' at row 1
Warning 1264 Out of range value for column 'd2' at row 1
select * from t1;
d1 d2
-1 0
......@@ -157,12 +157,12 @@ drop table t1;
create table t1 (f float(4,3));
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
Warnings:
Warning 1264 Out of range value adjusted for column 'f' at row 1
Warning 1264 Out of range value adjusted for column 'f' at row 2
Warning 1264 Out of range value adjusted for column 'f' at row 3
Warning 1264 Out of range value adjusted for column 'f' at row 4
Warning 1264 Out of range value adjusted for column 'f' at row 5
Warning 1264 Out of range value adjusted for column 'f' at row 6
Warning 1264 Out of range value for column 'f' at row 1
Warning 1264 Out of range value for column 'f' at row 2
Warning 1264 Out of range value for column 'f' at row 3
Warning 1264 Out of range value for column 'f' at row 4
Warning 1264 Out of range value for column 'f' at row 5
Warning 1264 Out of range value for column 'f' at row 6
select * from t1;
f
-9.999
......@@ -175,12 +175,12 @@ drop table if exists t1;
create table t1 (f double(4,3));
insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
Warnings:
Warning 1264 Out of range value adjusted for column 'f' at row 1
Warning 1264 Out of range value adjusted for column 'f' at row 2
Warning 1264 Out of range value adjusted for column 'f' at row 3
Warning 1264 Out of range value adjusted for column 'f' at row 4
Warning 1264 Out of range value adjusted for column 'f' at row 5
Warning 1264 Out of range value adjusted for column 'f' at row 6
Warning 1264 Out of range value for column 'f' at row 1
Warning 1264 Out of range value for column 'f' at row 2
Warning 1264 Out of range value for column 'f' at row 3
Warning 1264 Out of range value for column 'f' at row 4
Warning 1264 Out of range value for column 'f' at row 5
Warning 1264 Out of range value for column 'f' at row 6
select * from t1;
f
-9.999
......
......@@ -79,16 +79,16 @@ drop table t1;
create table t1 (a decimal(4,2));
insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
select a from t1;
a
99.99
......@@ -103,16 +103,16 @@ drop table t1;
create table t1 (a decimal(4,2) unsigned);
insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
select a from t1;
a
99.99
......@@ -127,13 +127,13 @@ drop table t1;
create table t1 (a bigint);
insert into t1 values (18446744073709551615.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values (9223372036854775808.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values (-18446744073709551615.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
a
9223372036854775807
......@@ -145,10 +145,10 @@ insert into t1 values (18446744073709551615.0);
insert into t1 values (9223372036854775808.0);
insert into t1 values (9999999999999999999999999.000);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values (-1.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
a
18446744073709551615
......@@ -159,12 +159,12 @@ drop table t1;
create table t1 (a tinyint);
insert into t1 values (18446744073709551615.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values (9223372036854775808.0);
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
a
127
......@@ -806,9 +806,9 @@ Warnings:
Note 1265 Data truncated for column 'col1' at row 1
INSERT INTO Sow6_2f VALUES (11);
INSERT INTO Sow6_2f VALUES (101.55);
ERROR 22003: Out of range value adjusted for column 'col1' at row 1
ERROR 22003: Out of range value for column 'col1' at row 1
UPDATE Sow6_2f SET col1 = col1 * 50 WHERE col1 = 11;
ERROR 22003: Out of range value adjusted for column 'col1' at row 5
ERROR 22003: Out of range value for column 'col1' at row 5
UPDATE Sow6_2f SET col1 = col1 / 0 WHERE col1 > 0;
ERROR 22012: Division by 0
SELECT MOD(col1,0) FROM Sow6_2f;
......@@ -872,13 +872,13 @@ NULL
set @@sql_mode='traditional';
create table t1( d1 decimal(18) unsigned, d2 decimal(20) unsigned, d3 decimal (22) unsigned);
insert into t1 values(1,-1,-1);
ERROR 22003: Out of range value adjusted for column 'd2' at row 1
ERROR 22003: Out of range value for column 'd2' at row 1
drop table t1;
create table t1 (col1 decimal(5,2), col2 numeric(5,2));
insert into t1 values (999.999,999.999);
ERROR 22003: Out of range value adjusted for column 'col1' at row 1
ERROR 22003: Out of range value for column 'col1' at row 1
insert into t1 values (-999.999,-999.999);
ERROR 22003: Out of range value adjusted for column 'col1' at row 1
ERROR 22003: Out of range value for column 'col1' at row 1
select * from t1;
col1 col2
drop table t1;
......@@ -1379,7 +1379,7 @@ insert into t1 values(
89000000000000000000000000000000000000000000000000000000000000000000000000000000000000000);
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
insert into t1 values(
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 *
99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999);
......@@ -1387,10 +1387,10 @@ Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
Error 1292 Truncated incorrect DECIMAL value: ''
Error 1292 Truncated incorrect DECIMAL value: ''
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
insert into t1 values(1e100);
Warnings:
Warning 1264 Out of range value adjusted for column 'c1' at row 1
Warning 1264 Out of range value for column 'c1' at row 1
select * from t1;
c1
9999999999999999999999999999999999999999999999999999999999999999
......
......@@ -91,35 +91,35 @@ Warnings:
Warning 1265 Data truncated for column 'string' at row 1
insert into t1 values (0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,NULL,19970807,080706,19970403090807,-1,-1,-1,'-1',-1,-1);
Warnings:
Warning 1264 Out of range value adjusted for column 'utiny' at row 1
Warning 1264 Out of range value adjusted for column 'ushort' at row 1
Warning 1264 Out of range value adjusted for column 'umedium' at row 1
Warning 1264 Out of range value adjusted for column 'ulong' at row 1
Warning 1264 Out of range value adjusted for column 'ulonglong' at row 1
Warning 1264 Out of range value for column 'utiny' at row 1
Warning 1264 Out of range value for column 'ushort' at row 1
Warning 1264 Out of range value for column 'umedium' at row 1
Warning 1264 Out of range value for column 'ulong' at row 1
Warning 1264 Out of range value for column 'ulonglong' at row 1
Warning 1265 Data truncated for column 'options' at row 1
Warning 1265 Data truncated for column 'flags' at row 1
insert into t1 values (0,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,-4294967295,NULL,0,0,0,-4294967295,-4294967295,-4294967295,'-4294967295',0,"one,two,tree");
Warnings:
Warning 1265 Data truncated for column 'string' at row 1
Warning 1264 Out of range value adjusted for column 'tiny' at row 1
Warning 1264 Out of range value adjusted for column 'short' at row 1
Warning 1264 Out of range value adjusted for column 'medium' at row 1
Warning 1264 Out of range value adjusted for column 'long_int' at row 1
Warning 1264 Out of range value adjusted for column 'utiny' at row 1
Warning 1264 Out of range value adjusted for column 'ushort' at row 1
Warning 1264 Out of range value adjusted for column 'umedium' at row 1
Warning 1264 Out of range value adjusted for column 'ulong' at row 1
Warning 1264 Out of range value adjusted for column 'ulonglong' at row 1
Warning 1264 Out of range value for column 'tiny' at row 1
Warning 1264 Out of range value for column 'short' at row 1
Warning 1264 Out of range value for column 'medium' at row 1
Warning 1264 Out of range value for column 'long_int' at row 1
Warning 1264 Out of range value for column 'utiny' at row 1
Warning 1264 Out of range value for column 'ushort' at row 1
Warning 1264 Out of range value for column 'umedium' at row 1
Warning 1264 Out of range value for column 'ulong' at row 1
Warning 1264 Out of range value for column 'ulonglong' at row 1
Warning 1265 Data truncated for column 'options' at row 1
insert into t1 values (0,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,4294967295,NULL,0,0,0,4294967295,4294967295,4294967295,'4294967295',0,0);
Warnings:
Warning 1264 Out of range value adjusted for column 'tiny' at row 1
Warning 1264 Out of range value adjusted for column 'short' at row 1
Warning 1264 Out of range value adjusted for column 'medium' at row 1
Warning 1264 Out of range value adjusted for column 'long_int' at row 1
Warning 1264 Out of range value adjusted for column 'utiny' at row 1
Warning 1264 Out of range value adjusted for column 'ushort' at row 1
Warning 1264 Out of range value adjusted for column 'umedium' at row 1
Warning 1264 Out of range value for column 'tiny' at row 1
Warning 1264 Out of range value for column 'short' at row 1
Warning 1264 Out of range value for column 'medium' at row 1
Warning 1264 Out of range value for column 'long_int' at row 1
Warning 1264 Out of range value for column 'utiny' at row 1
Warning 1264 Out of range value for column 'ushort' at row 1
Warning 1264 Out of range value for column 'umedium' at row 1
Warning 1265 Data truncated for column 'options' at row 1
insert into t1 (tiny) values (1);
select auto,string,tiny,short,medium,long_int,longlong,real_float,real_double,utiny,ushort,umedium,ulong,ulonglong,mod(floor(time_stamp/1000000),1000000)-mod(curdate(),1000000),date_field,time_field,date_time,blob_col,tinyblob_col,mediumblob_col,longblob_col from t1;
......
......@@ -26,9 +26,9 @@ t
insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a");
Warnings:
Warning 1265 Data truncated for column 't' at row 1
Warning 1264 Out of range value adjusted for column 't' at row 2
Warning 1264 Out of range value adjusted for column 't' at row 3
Warning 1264 Out of range value adjusted for column 't' at row 4
Warning 1264 Out of range value for column 't' at row 2
Warning 1264 Out of range value for column 't' at row 3
Warning 1264 Out of range value for column 't' at row 4
Warning 1265 Data truncated for column 't' at row 6
select * from t1;
t
......
......@@ -4,10 +4,10 @@ create table t1 (this int unsigned);
insert into t1 values (1);
insert into t1 values (-1);
Warnings:
Warning 1264 Out of range value adjusted for column 'this' at row 1
Warning 1264 Out of range value for column 'this' at row 1
insert into t1 values ('5000000000');
Warnings:
Warning 1264 Out of range value adjusted for column 'this' at row 1
Warning 1264 Out of range value for column 'this' at row 1
select * from t1;
this
1
......
......@@ -1306,9 +1306,9 @@ a b
delete from t1;
load data infile '../../std_data/loaddata3.dat' ignore into table v1 fields terminated by '' enclosed by '' ignore 1 lines;
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 3
Error 1369 CHECK OPTION failed 'test.v1'
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 4
Error 1369 CHECK OPTION failed 'test.v1'
select * from t1;
a b
......
......@@ -31,19 +31,19 @@ Error 1064 You have an error in your SQL syntax; check the manual that correspon
insert into t1 values (1);
insert into t1 values ("hej");
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values ("hej"),("då");
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
set SQL_WARNINGS=1;
insert into t1 values ("hej");
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values ("hej"),("då");
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
drop table t1;
set SQL_WARNINGS=0;
drop temporary table if exists not_exists;
......@@ -78,7 +78,7 @@ Warning 1265 Data truncated for column 'c' at row 4
Warning 1261 Row 5 doesn't contain data for all columns
Warning 1265 Data truncated for column 'b' at row 6
Warning 1262 Row 7 was truncated; it contained more data than there were input columns
Warning 1264 Out of range value adjusted for column 'a' at row 8
Warning 1264 Out of range value for column 'a' at row 8
select @@warning_count;
@@warning_count
7
......@@ -87,10 +87,10 @@ create table t1(a tinyint NOT NULL, b tinyint unsigned, c char(5));
insert into t1 values(NULL,100,'mysql'),(10,-1,'mysql ab'),(500,256,'open source'),(20,NULL,'test');
Warnings:
Warning 1048 Column 'a' cannot be null
Warning 1264 Out of range value adjusted for column 'b' at row 2
Warning 1264 Out of range value for column 'b' at row 2
Warning 1265 Data truncated for column 'c' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'b' at row 3
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'b' at row 3
Warning 1265 Data truncated for column 'c' at row 3
alter table t1 modify c char(4);
Warnings:
......@@ -180,44 +180,44 @@ create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
update t1 set a='abc';
Warnings:
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value adjusted for column 'a' at row 5
Warning 1264 Out of range value adjusted for column 'a' at row 6
Warning 1264 Out of range value adjusted for column 'a' at row 7
Warning 1264 Out of range value adjusted for column 'a' at row 8
Warning 1264 Out of range value adjusted for column 'a' at row 9
Warning 1264 Out of range value adjusted for column 'a' at row 10
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 5
Warning 1264 Out of range value for column 'a' at row 6
Warning 1264 Out of range value for column 'a' at row 7
Warning 1264 Out of range value for column 'a' at row 8
Warning 1264 Out of range value for column 'a' at row 9
Warning 1264 Out of range value for column 'a' at row 10
show warnings limit 2, 1;
Level Code Message
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 3
show warnings limit 0, 10;
Level Code Message
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value adjusted for column 'a' at row 2
Warning 1264 Out of range value adjusted for column 'a' at row 3
Warning 1264 Out of range value adjusted for column 'a' at row 4
Warning 1264 Out of range value adjusted for column 'a' at row 5
Warning 1264 Out of range value adjusted for column 'a' at row 6
Warning 1264 Out of range value adjusted for column 'a' at row 7
Warning 1264 Out of range value adjusted for column 'a' at row 8
Warning 1264 Out of range value adjusted for column 'a' at row 9
Warning 1264 Out of range value adjusted for column 'a' at row 10
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
Warning 1264 Out of range value for column 'a' at row 4
Warning 1264 Out of range value for column 'a' at row 5
Warning 1264 Out of range value for column 'a' at row 6
Warning 1264 Out of range value for column 'a' at row 7
Warning 1264 Out of range value for column 'a' at row 8
Warning 1264 Out of range value for column 'a' at row 9
Warning 1264 Out of range value for column 'a' at row 10
show warnings limit 9, 1;
Level Code Message
Warning 1264 Out of range value adjusted for column 'a' at row 10
Warning 1264 Out of range value for column 'a' at row 10
show warnings limit 10, 1;
Level Code Message
show warnings limit 9, 2;
Level Code Message
Warning 1264 Out of range value adjusted for column 'a' at row 10
Warning 1264 Out of range value for column 'a' at row 10
show warnings limit 0, 0;
Level Code Message
show warnings limit 1;
Level Code Message
Warning 1264 Out of range value adjusted for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
show warnings limit 0;
Level Code Message
show warnings limit 1, 0;
......
......@@ -4898,10 +4898,7 @@ ER_WARN_NULL_TO_NOTNULL 22004
por "Dado truncado, NULL fornecido para NOT NULL coluna '%s' na linha %ld"
spa "Datos truncado, NULL suministrado para NOT NULL columna '%s' en la lnea %ld"
ER_WARN_DATA_OUT_OF_RANGE 22003
eng "Out of range value adjusted for column '%s' at row %ld"
ger "Daten abgeschnitten, auerhalb des Wertebereichs fr Feld '%s' in Zeile %ld"
por "Dado truncado, fora de alcance para coluna '%s' na linha %ld"
spa "Datos truncados, fuera de gama para columna '%s' en la lnea %ld"
eng "Out of range value for column '%s' at row %ld"
WARN_DATA_TRUNCATED 01000
eng "Data truncated for column '%s' at row %ld"
ger "Daten abgeschnitten fr Feld '%s' in Zeile %ld"
......@@ -5721,3 +5718,5 @@ ER_DROP_PARTITION_WHEN_FK_DEFINED
swe "Kan inte ta bort en partition nr en frmmande nyckel r definierad p tabellen"
ER_PLUGIN_IS_NOT_LOADED
eng "Plugin '%-.64s' is not loaded"
ER_WRONG_VALUE
eng "Incorrect %-.32s value: '%-.128s'"
......@@ -711,9 +711,15 @@ void make_truncated_value_warning(THD *thd, const char *str_val,
type_str, str.c_ptr(), field_name,
(ulong) thd->row_count);
else
cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
ER(ER_TRUNCATED_WRONG_VALUE),
type_str, str.c_ptr());
{
if (time_type > MYSQL_TIMESTAMP_ERROR)
cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
ER(ER_TRUNCATED_WRONG_VALUE),
type_str, str.c_ptr());
else
cs->cset->snprintf(cs, warn_buff, sizeof(warn_buff),
ER(ER_WRONG_VALUE), type_str, str.c_ptr());
}
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_WARN,
ER_TRUNCATED_WRONG_VALUE, warn_buff);
}
......
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