summaryrefslogtreecommitdiff
path: root/mysql-test/r/insert.result
diff options
context:
space:
mode:
authorunknown <monty@mishka.local>2004-10-02 22:20:08 +0300
committerunknown <monty@mishka.local>2004-10-02 22:20:08 +0300
commitd4f0cdc5bb92666449a4e4d086ecd87d98ba8a81 (patch)
tree6c0a1c36e51cd1d74e5e4c2f58e89904ff71fb46 /mysql-test/r/insert.result
parentae7e70d9f6aeecf8da34dffd88e9f0879a4c647c (diff)
downloadmariadb-git-d4f0cdc5bb92666449a4e4d086ecd87d98ba8a81.tar.gz
More fixes for strict mode:
More tests. Better error messages. Fixed bug when checking if we updated all needed columns for INSERT. Give an error if we encounter a wrong float value during parsing. Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS. Fixed UPDATE IGNORE when using STRICT mode. include/mysqld_error.h: More error messages for strict mode include/sql_state.h: Fixed wrong state New error message mysql-test/r/alter_table.result: Updated results for not automatic default fields mysql-test/r/auto_increment.result: Better error messages mysql-test/r/create.result: Updated results for not automatic default fields Better error messages mysql-test/r/ctype_collate.result: Updated results for not automatic default fields mysql-test/r/ctype_latin1_de.result: Updated results for not automatic default fields mysql-test/r/ctype_many.result: Updated results for not automatic default fields mysql-test/r/ctype_recoding.result: Updated results for not automatic default fields mysql-test/r/gis-rtree.result: Updated results for not automatic default fields mysql-test/r/gis.result: Updated results for not automatic default fields mysql-test/r/innodb.result: Updated results for not automatic default fields mysql-test/r/insert.result: Better error messages mysql-test/r/insert_select.result: Better error messages mysql-test/r/isam.result: Updated results for not automatic default fields mysql-test/r/key.result: Better error messages mysql-test/r/merge.result: Updated results for not automatic default fields mysql-test/r/null.result: Better error messages mysql-test/r/null_key.result: Better error messages mysql-test/r/ps_1general.result: Updated results for not automatic default fields mysql-test/r/select.result: Drop views that may interfere with later results mysql-test/r/show_check.result: Updated results for not automatic default fields mysql-test/r/sp.result: Updated results for not automatic default fields mysql-test/r/strict.result: More tests mysql-test/r/type_set.result: Updated results for not automatic default fields mysql-test/r/warnings.result: Better error messages mysql-test/t/insert.test: Using wrong float values now gives an error mysql-test/t/select.test: Drop views that may interfere with later results mysql-test/t/strict.test: More tests scripts/mysql_fix_privilege_tables.sql: Add missing DEFAULT's sql/field.cc: Fix some strict mode issues for float and double sql/field.h: Fix DEFAULT handling sql/item.cc: Give an error if we encounter a wrong float value during parsing. Give an error if we use DEFAULT() on a field that doesn't have a default value. sql/item.h: Give an error if we encounter a wrong float value during parsing. sql/mysqld.cc: More debug info sql/share/czech/errmsg.txt: Better error messages sql/share/danish/errmsg.txt: Better error messages sql/share/dutch/errmsg.txt: Better error messages sql/share/english/errmsg.txt: Better error messages sql/share/estonian/errmsg.txt: Better error messages sql/share/french/errmsg.txt: Better error messages sql/share/german/errmsg.txt: Better error messages sql/share/greek/errmsg.txt: Better error messages sql/share/hungarian/errmsg.txt: Better error messages sql/share/italian/errmsg.txt: Better error messages sql/share/japanese/errmsg.txt: Better error messages sql/share/korean/errmsg.txt: Better error messages sql/share/norwegian-ny/errmsg.txt: Better error messages sql/share/norwegian/errmsg.txt: Better error messages sql/share/polish/errmsg.txt: Better error messages sql/share/portuguese/errmsg.txt: Better error messages sql/share/romanian/errmsg.txt: Better error messages sql/share/russian/errmsg.txt: Better error messages sql/share/serbian/errmsg.txt: Better error messages sql/share/slovak/errmsg.txt: Better error messages sql/share/spanish/errmsg.txt: Better error messages sql/share/swedish/errmsg.txt: Better error messages sql/share/ukrainian/errmsg.txt: Better error messages sql/sql_insert.cc: Fixed bug in last push of checking of default values. sql/sql_parse.cc: Enum fields has always a default value sql/sql_show.cc: Don't print DEFAULT for columns without a default value in SHOW CREATE/SHOW FIELDS sql/sql_table.cc: Fixed storing/retrieving of NO_DEFAULT_VALUE_FLAG sql/sql_update.cc: Don't abort for wrong values for UPDATE IGNORE sql/sql_yacc.yy: Abort if we find a wrong float value sql/table.cc: Fixed storing/retrieving of NO_DEFAULT_VALUE_FLAG
Diffstat (limited to 'mysql-test/r/insert.result')
-rw-r--r--mysql-test/r/insert.result83
1 files changed, 23 insertions, 60 deletions
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 474820488a8..47a9819f440 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -63,7 +63,7 @@ insert into t1 values(NULL);
ERROR 23000: Column 'id' cannot be null
insert into t1 values (1), (NULL), (2);
Warnings:
-Warning 1263 Data truncated; NULL supplied to NOT NULL column 'id' at row 2
+Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'id' at row 2
select * from t1;
id
1
@@ -157,19 +157,19 @@ 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 1265 Data truncated for column 'f_double' at row 1
-Warning 1265 Data truncated for column 'f_float' at row 1
+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 1265 Data truncated 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 1265 Data truncated for column 'f_float_4_3' 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 1265 Data truncated for column 'f_double_u' at row 1
-Warning 1265 Data truncated for column 'f_float_u' 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 1265 Data truncated 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 1265 Data truncated for column 'f_float_3_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
select * from t1 where number =last_insert_id();
number 4
@@ -185,20 +185,20 @@ 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 1265 Data truncated for column 'f_double' at row 1
-Warning 1265 Data truncated for column 'f_float' at row 1
+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 1265 Data truncated 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 1265 Data truncated for column 'f_float_4_3' 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 1265 Data truncated for column 'f_double_u' at row 1
Warning 1264 Out of range value adjusted for column 'f_double_u' at row 1
-Warning 1265 Data truncated for column 'f_float_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 1265 Data truncated 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 1265 Data truncated for column 'f_float_3_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
select * from t1 where number =last_insert_id();
number 5
@@ -212,46 +212,9 @@ f_float_u 0
f_double_15_1_u 0.0
f_float_3_1_u 0.0
set @value= 1e+1111111111;
-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
-select * from t1 where number =last_insert_id();
-number 6
-original_value 1.7976931348623e+308
-f_double 1.79769313486232e+308
-f_float 3.40282e+38
-f_double_7_2 99999.99
-f_float_4_3 9.999
-f_double_u 1.79769313486232e+308
-f_float_u 3.40282e+38
-f_double_15_1_u 99999999999999.9
-f_float_3_1_u 99.9
+ERROR 22007: Illegal double '1e+1111111111' value found during parsing
set @value= -1e+1111111111;
-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
-select * from t1 where number =last_insert_id();
-number 7
-original_value -1.7976931348623e+308
-f_double -1.79769313486232e+308
-f_float -3.40282e+38
-f_double_7_2 -99999.99
-f_float_4_3 -9.999
-f_double_u 0
-f_float_u 0
-f_double_15_1_u 0.0
-f_float_3_1_u 0.0
+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:
@@ -262,7 +225,7 @@ 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
select * from t1 where number =last_insert_id();
-number 8
+number 6
original_value 1e+111
f_double 1e+111
f_float 3.40282e+38
@@ -283,7 +246,7 @@ 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
select * from t1 where number =last_insert_id();
-number 9
+number 7
original_value -1e+111
f_double -1e+111
f_float -3.40282e+38
@@ -296,7 +259,7 @@ f_float_3_1_u 0.0
set @value= 1;
insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
select * from t1 where number =last_insert_id();
-number 10
+number 8
original_value 1
f_double 1
f_float 1
@@ -314,7 +277,7 @@ 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
select * from t1 where number =last_insert_id();
-number 11
+number 9
original_value -1
f_double -1
f_float -1