summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/adddate_454.result1
-rw-r--r--mysql-test/r/alias.result2
-rw-r--r--mysql-test/r/alter_table.result6
-rw-r--r--mysql-test/r/auto_increment_ranges_innodb.result12
-rw-r--r--mysql-test/r/auto_increment_ranges_myisam.result12
-rw-r--r--mysql-test/r/bigint.result6
-rw-r--r--mysql-test/r/bug13633383.result4
-rw-r--r--mysql-test/r/case.result14
-rw-r--r--mysql-test/r/cast.result24
-rw-r--r--mysql-test/r/comment_column.result2
-rw-r--r--mysql-test/r/comment_index.result4
-rw-r--r--mysql-test/r/commit_1innodb.result2
-rw-r--r--mysql-test/r/compound.result2
-rw-r--r--mysql-test/r/compress.result2
-rw-r--r--mysql-test/r/create.result18
-rw-r--r--mysql-test/r/create_drop_function.result2
-rw-r--r--mysql-test/r/ctype_big5.result186
-rw-r--r--mysql-test/r/ctype_binary.result244
-rw-r--r--mysql-test/r/ctype_collate.result2
-rw-r--r--mysql-test/r/ctype_cp1250_ch.result16
-rw-r--r--mysql-test/r/ctype_cp1251.result236
-rw-r--r--mysql-test/r/ctype_cp932_binlog_stm.result146
-rw-r--r--mysql-test/r/ctype_eucjpms.result184
-rw-r--r--mysql-test/r/ctype_euckr.result186
-rw-r--r--mysql-test/r/ctype_gb2312.result174
-rw-r--r--mysql-test/r/ctype_gbk.result202
-rw-r--r--mysql-test/r/ctype_latin1.result272
-rw-r--r--mysql-test/r/ctype_latin1_de.result4
-rw-r--r--mysql-test/r/ctype_latin2.result6
-rw-r--r--mysql-test/r/ctype_latin2_ch.result12
-rw-r--r--mysql-test/r/ctype_ldml.result2
-rw-r--r--mysql-test/r/ctype_many.result4
-rw-r--r--mysql-test/r/ctype_mb.result2
-rw-r--r--mysql-test/r/ctype_recoding.result2
-rw-r--r--mysql-test/r/ctype_sjis.result188
-rw-r--r--mysql-test/r/ctype_swe7.result2
-rw-r--r--mysql-test/r/ctype_tis620.result26
-rw-r--r--mysql-test/r/ctype_uca.result88
-rw-r--r--mysql-test/r/ctype_uca_innodb.result10
-rw-r--r--mysql-test/r/ctype_ucs.result317
-rw-r--r--mysql-test/r/ctype_ujis.result182
-rw-r--r--mysql-test/r/ctype_ujis_ucs2.result4
-rw-r--r--mysql-test/r/ctype_utf16.result24
-rw-r--r--mysql-test/r/ctype_utf16_uca.result22
-rw-r--r--mysql-test/r/ctype_utf16le.result26
-rw-r--r--mysql-test/r/ctype_utf32.result44
-rw-r--r--mysql-test/r/ctype_utf32_uca.result22
-rw-r--r--mysql-test/r/ctype_utf8.result326
-rw-r--r--mysql-test/r/ctype_utf8mb4.result56
-rw-r--r--mysql-test/r/ctype_utf8mb4_heap.result40
-rw-r--r--mysql-test/r/ctype_utf8mb4_innodb.result40
-rw-r--r--mysql-test/r/ctype_utf8mb4_myisam.result40
-rw-r--r--mysql-test/r/ctype_utf8mb4_uca.result10
-rw-r--r--mysql-test/r/date_formats.result137
-rw-r--r--mysql-test/r/datetime_456.result2
-rw-r--r--mysql-test/r/default.result34
-rw-r--r--mysql-test/r/default_session.result6
-rw-r--r--mysql-test/r/delete.result4
-rw-r--r--mysql-test/r/derived.result2
-rw-r--r--mysql-test/r/derived_view.result7
-rw-r--r--mysql-test/r/distinct.result6
-rw-r--r--mysql-test/r/dyncol.result12
-rw-r--r--mysql-test/r/errors.result4
-rw-r--r--mysql-test/r/events_restart.result2
-rw-r--r--mysql-test/r/failed_auth_3909.result2
-rw-r--r--mysql-test/r/fulltext.result2
-rw-r--r--mysql-test/r/func_gconcat.result4
-rw-r--r--mysql-test/r/func_hybrid_type.result66
-rw-r--r--mysql-test/r/func_in.result8
-rw-r--r--mysql-test/r/func_json.result4
-rw-r--r--mysql-test/r/func_like.result2
-rw-r--r--mysql-test/r/func_math.result23
-rw-r--r--mysql-test/r/func_misc.result4
-rw-r--r--mysql-test/r/func_regexp_pcre.result8
-rw-r--r--mysql-test/r/func_set.result2
-rw-r--r--mysql-test/r/func_str.result192
-rw-r--r--mysql-test/r/func_system.result6
-rw-r--r--mysql-test/r/func_test.result18
-rw-r--r--mysql-test/r/func_time.result101
-rw-r--r--mysql-test/r/function_defaults.result4
-rw-r--r--mysql-test/r/function_defaults_innodb.result4
-rw-r--r--mysql-test/r/get_diagnostics.result2
-rw-r--r--mysql-test/r/gis-rtree.result4
-rw-r--r--mysql-test/r/gis.result10
-rw-r--r--mysql-test/r/group_by.result26
-rw-r--r--mysql-test/r/having.result2
-rw-r--r--mysql-test/r/help.result16
-rw-r--r--mysql-test/r/innodb_icp.result16
-rw-r--r--mysql-test/r/insert.result30
-rw-r--r--mysql-test/r/insert_select.result8
-rw-r--r--mysql-test/r/join.result6
-rw-r--r--mysql-test/r/join_cache.result1
-rw-r--r--mysql-test/r/join_outer.result9
-rw-r--r--mysql-test/r/join_outer_innodb.result2
-rw-r--r--mysql-test/r/join_outer_jcl6.result9
-rw-r--r--mysql-test/r/key.result8
-rw-r--r--mysql-test/r/limit_rows_examined.result2
-rw-r--r--mysql-test/r/loaddata.result10
-rw-r--r--mysql-test/r/loaddata_autocom_innodb.result4
-rw-r--r--mysql-test/r/merge.result2
-rw-r--r--mysql-test/r/mix2_myisam.result24
-rw-r--r--mysql-test/r/multi_update.result6
-rw-r--r--mysql-test/r/myisam-blob.result4
-rw-r--r--mysql-test/r/myisam.result10
-rw-r--r--mysql-test/r/myisam_icp.result16
-rw-r--r--mysql-test/r/mysqlbinlog-innodb.result4
-rw-r--r--mysql-test/r/mysqlbinlog.result20
-rw-r--r--mysql-test/r/mysqlbinlog_row_compressed.result2
-rw-r--r--mysql-test/r/mysqlbinlog_row_minimal.result2
-rw-r--r--mysql-test/r/mysqlbinlog_stmt_compressed.result2
-rw-r--r--mysql-test/r/mysqld--help.result2
-rw-r--r--mysql-test/r/mysqldump-nl.result2
-rw-r--r--mysql-test/r/mysqldump.result26
-rw-r--r--mysql-test/r/mysqlhotcopy_myisam.result6
-rw-r--r--mysql-test/r/null.result18
-rw-r--r--mysql-test/r/null_key.result2
-rw-r--r--mysql-test/r/old-mode.result26
-rw-r--r--mysql-test/r/order_by.result1
-rw-r--r--mysql-test/r/order_by_zerolength-4285.result14
-rw-r--r--mysql-test/r/packet.result2
-rw-r--r--mysql-test/r/partition_binlog_stmt.result4
-rw-r--r--mysql-test/r/partition_datatype.result108
-rw-r--r--mysql-test/r/partition_default.result156
-rw-r--r--mysql-test/r/partition_error.result10
-rw-r--r--mysql-test/r/partition_exchange.result14
-rw-r--r--mysql-test/r/partition_innodb.result2
-rw-r--r--mysql-test/r/partition_pruning.result288
-rw-r--r--mysql-test/r/plugin_auth.result2
-rw-r--r--mysql-test/r/pool_of_threads.result2
-rw-r--r--mysql-test/r/ps.result33
-rw-r--r--mysql-test/r/ps_1general.result2
-rw-r--r--mysql-test/r/ps_2myisam.result26
-rw-r--r--mysql-test/r/ps_3innodb.result26
-rw-r--r--mysql-test/r/ps_4heap.result26
-rw-r--r--mysql-test/r/ps_5merge.result52
-rw-r--r--mysql-test/r/query_cache.result2
-rw-r--r--mysql-test/r/quick_select_4161.result1
-rw-r--r--mysql-test/r/range.result21
-rw-r--r--mysql-test/r/range_mrr_icp.result21
-rw-r--r--mysql-test/r/round.result32
-rw-r--r--mysql-test/r/row.result5
-rw-r--r--mysql-test/r/select.result57
-rw-r--r--mysql-test/r/select_jcl6.result57
-rw-r--r--mysql-test/r/select_pkeycache.result57
-rw-r--r--mysql-test/r/selectivity.result5
-rw-r--r--mysql-test/r/selectivity_innodb.result5
-rw-r--r--mysql-test/r/set_statement.result12
-rw-r--r--mysql-test/r/show_check.result80
-rw-r--r--mysql-test/r/signal.result12
-rw-r--r--mysql-test/r/skip_grants.result4
-rw-r--r--mysql-test/r/sp-destruct.result18
-rw-r--r--mysql-test/r/sp-dynamic.result2
-rw-r--r--mysql-test/r/sp-error.result20
-rw-r--r--mysql-test/r/sp-lock.result2
-rw-r--r--mysql-test/r/sp-security.result12
-rw-r--r--mysql-test/r/sp-ucs2.result12
-rw-r--r--mysql-test/r/sp.result8
-rw-r--r--mysql-test/r/sp_notembedded.result4
-rw-r--r--mysql-test/r/ssl.result2
-rw-r--r--mysql-test/r/ssl_compress.result2
-rw-r--r--mysql-test/r/str_to_datetime_457.result16
-rw-r--r--mysql-test/r/strict.result3
-rw-r--r--mysql-test/r/subselect.result20
-rw-r--r--mysql-test/r/subselect2.result6
-rw-r--r--mysql-test/r/subselect4.result2
-rw-r--r--mysql-test/r/subselect_cache.result2
-rw-r--r--mysql-test/r/subselect_innodb.result2
-rw-r--r--mysql-test/r/subselect_mat.result2
-rw-r--r--mysql-test/r/subselect_no_exists_to_in.result20
-rw-r--r--mysql-test/r/subselect_no_mat.result20
-rw-r--r--mysql-test/r/subselect_no_opts.result20
-rw-r--r--mysql-test/r/subselect_no_scache.result20
-rw-r--r--mysql-test/r/subselect_no_semijoin.result20
-rw-r--r--mysql-test/r/subselect_sj.result72
-rw-r--r--mysql-test/r/subselect_sj_jcl6.result72
-rw-r--r--mysql-test/r/subselect_sj_mat.result2
-rw-r--r--mysql-test/r/system_mysql_db_refs.result12
-rw-r--r--mysql-test/r/temporal_literal.result24
-rw-r--r--mysql-test/r/timezone2.result9
-rw-r--r--mysql-test/r/trigger-compat.result4
-rw-r--r--mysql-test/r/trigger.result8
-rw-r--r--mysql-test/r/trigger_notembedded.result14
-rw-r--r--mysql-test/r/trigger_wl3253.result40
-rw-r--r--mysql-test/r/truncate.result2
-rw-r--r--mysql-test/r/type_binary.result4
-rw-r--r--mysql-test/r/type_bit.result6
-rw-r--r--mysql-test/r/type_bit_innodb.result4
-rw-r--r--mysql-test/r/type_blob.result20
-rw-r--r--mysql-test/r/type_date.result64
-rw-r--r--mysql-test/r/type_datetime.result138
-rw-r--r--mysql-test/r/type_datetime_hires.result20
-rw-r--r--mysql-test/r/type_decimal.result52
-rw-r--r--mysql-test/r/type_enum.result10
-rw-r--r--mysql-test/r/type_float.result28
-rw-r--r--mysql-test/r/type_newdecimal.result22
-rw-r--r--mysql-test/r/type_num.result22
-rw-r--r--mysql-test/r/type_ranges.result35
-rw-r--r--mysql-test/r/type_set.result2
-rw-r--r--mysql-test/r/type_temporal_innodb.result16
-rw-r--r--mysql-test/r/type_time.result8
-rw-r--r--mysql-test/r/type_time_hires.result14
-rw-r--r--mysql-test/r/type_timestamp.result72
-rw-r--r--mysql-test/r/type_timestamp_hires.result16
-rw-r--r--mysql-test/r/type_uint.result4
-rw-r--r--mysql-test/r/type_year.result16
-rw-r--r--mysql-test/r/union.result10
-rw-r--r--mysql-test/r/update.result4
-rw-r--r--mysql-test/r/user_var-binlog.result2
-rw-r--r--mysql-test/r/view.result6
-rw-r--r--mysql-test/r/warnings.result22
-rw-r--r--mysql-test/r/win.result88
-rw-r--r--mysql-test/r/xtradb_mrr.result9
212 files changed, 4055 insertions, 2757 deletions
diff --git a/mysql-test/r/adddate_454.result b/mysql-test/r/adddate_454.result
index 8b7c17cd47e..4f8e2b620e5 100644
--- a/mysql-test/r/adddate_454.result
+++ b/mysql-test/r/adddate_454.result
@@ -1,3 +1,4 @@
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (d date);
insert into t1 values ('2012-00-00');
select * from t1;
diff --git a/mysql-test/r/alias.result b/mysql-test/r/alias.result
index defd44f2548..da9b1c4d9cd 100644
--- a/mysql-test/r/alias.result
+++ b/mysql-test/r/alias.result
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
ver_nr int(11) NOT NULL default '0',
@@ -48,6 +49,7 @@ KEY mcbs_aufnr(mcbs_aufnr),
KEY kundentyp(kundentyp),
KEY p_nr(p_nr,suffix)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprüft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
diff --git a/mysql-test/r/alter_table.result b/mysql-test/r/alter_table.result
index c3049ac4adf..9b32905b521 100644
--- a/mysql-test/r/alter_table.result
+++ b/mysql-test/r/alter_table.result
@@ -8,12 +8,14 @@ col4 varchar(4) not null,
col5 enum('PENDING', 'ACTIVE', 'DISABLED') not null,
col6 int not null, to_be_deleted int);
insert into t1 values (2,4,3,5,"PENDING",1,7);
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1
add column col4_5 varchar(20) not null after col4,
add column col7 varchar(30) not null after col5,
add column col8 datetime not null, drop column to_be_deleted,
change column col2 fourth varchar(30) not null after col3,
modify column col6 int not null first;
+set sql_mode = DEFAULT;
select * from t1;
col6 col1 col3 fourth col4 col4_5 col5 col7 col8
1 2 3 4 5 PENDING 0000-00-00 00:00:00
@@ -292,7 +294,7 @@ t2 CREATE TABLE `t2` (
) ENGINE=MRG_MyISAM DEFAULT CHARSET=latin1 UNION=(`t1`)
drop table if exists t1, t2;
create table t1 (a int, b int, c int, d int, e int, f int, g int, h int,i int, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
-insert into t1 (a) values(1);
+insert ignore into t1 (a) values(1);
Warnings:
Warning 1364 Field 'b' doesn't have a default value
Warning 1364 Field 'c' doesn't have a default value
@@ -311,7 +313,7 @@ Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length I
t1 MyISAM 10 Fixed 1 37 X X X X X X X X latin1_swedish_ci NULL
drop table t1;
create table t1 (a int not null, b int not null, c int not null, d int not null, e int not null, f int not null, g int not null, h int not null,i int not null, primary key (a,b,c,d,e,f,g,i,h)) engine=MyISAM;
-insert into t1 (a) values(1);
+insert ignore into t1 (a) values(1);
Warnings:
Warning 1364 Field 'b' doesn't have a default value
Warning 1364 Field 'c' doesn't have a default value
diff --git a/mysql-test/r/auto_increment_ranges_innodb.result b/mysql-test/r/auto_increment_ranges_innodb.result
index fb936ddfd2b..1d827a5a166 100644
--- a/mysql-test/r/auto_increment_ranges_innodb.result
+++ b/mysql-test/r/auto_increment_ranges_innodb.result
@@ -25,7 +25,7 @@ truncate table t1;
insert into t1 values(32767-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(32767+1);
+insert ignore into t1 values(32767+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -59,7 +59,7 @@ truncate table t1;
insert into t1 values(65535-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(65535+1);
+insert ignore into t1 values(65535+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -93,7 +93,7 @@ truncate table t1;
insert into t1 values(2147483647-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(2147483647+1);
+insert ignore into t1 values(2147483647+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -127,7 +127,7 @@ truncate table t1;
insert into t1 values(4294967295-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(4294967295+1);
+insert ignore into t1 values(4294967295+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -161,7 +161,7 @@ truncate table t1;
insert into t1 values(cast(9223372036854775807 as unsigned)-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(cast(9223372036854775807 as unsigned)+1);
+insert ignore into t1 values(cast(9223372036854775807 as unsigned)+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -245,7 +245,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a));
INSERT INTO t1 VALUES (2);
-INSERT INTO t1 VALUES (32768);
+INSERT IGNORE INTO t1 VALUES (32768);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
INSERT INTO t1 VALUES (NULL);
diff --git a/mysql-test/r/auto_increment_ranges_myisam.result b/mysql-test/r/auto_increment_ranges_myisam.result
index 5101321c864..e849e980083 100644
--- a/mysql-test/r/auto_increment_ranges_myisam.result
+++ b/mysql-test/r/auto_increment_ranges_myisam.result
@@ -26,7 +26,7 @@ truncate table t1;
insert into t1 values(32767-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(32767+1);
+insert ignore into t1 values(32767+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -61,7 +61,7 @@ truncate table t1;
insert into t1 values(65535-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(65535+1);
+insert ignore into t1 values(65535+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -96,7 +96,7 @@ truncate table t1;
insert into t1 values(2147483647-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(2147483647+1);
+insert ignore into t1 values(2147483647+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -131,7 +131,7 @@ truncate table t1;
insert into t1 values(4294967295-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(4294967295+1);
+insert ignore into t1 values(4294967295+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -166,7 +166,7 @@ truncate table t1;
insert into t1 values(cast(9223372036854775807 as unsigned)-1),(NULL),(NULL);
ERROR 22003: Out of range value for column 'a' at row 3
truncate table t1;
-insert into t1 values(cast(9223372036854775807 as unsigned)+1);
+insert ignore into t1 values(cast(9223372036854775807 as unsigned)+1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -251,7 +251,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (a smallint AUTO_INCREMENT, PRIMARY KEY (a));
INSERT INTO t1 VALUES (2);
-INSERT INTO t1 VALUES (32768);
+INSERT IGNORE INTO t1 VALUES (32768);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
INSERT INTO t1 VALUES (NULL);
diff --git a/mysql-test/r/bigint.result b/mysql-test/r/bigint.result
index e58cce67d6a..e49a001399f 100644
--- a/mysql-test/r/bigint.result
+++ b/mysql-test/r/bigint.result
@@ -60,9 +60,11 @@ min(big) max(big) max(big)-1
select min(big),max(big),max(big)-1 from t1 group by a;
min(big) max(big) max(big)-1
-1 9223372036854775807 9223372036854775806
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify big bigint unsigned not null;
Warnings:
Warning 1264 Out of range value for column 'big' at row 1
+set sql_mode = DEFAULT;
select min(big),max(big),max(big)-1 from t1;
min(big) max(big) max(big)-1
0 9223372036854775807 9223372036854775806
@@ -90,9 +92,11 @@ min(big) max(big) max(big)-1
select min(big),max(big),max(big)-1 from t1 group by a;
min(big) max(big) max(big)-1
0 18446744073709551615 18446744073709551614
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify big bigint not null;
Warnings:
Warning 1264 Out of range value for column 'big' at row 5
+set sql_mode = DEFAULT;
select * from t1;
a big
1 0
@@ -208,7 +212,7 @@ a b c d
18446744073709551615 18446744073709551615 18446744073709551615 18446744073709551615
drop table t1;
create table t1 ( quantity decimal(2) unsigned);
-insert into t1 values (500), (-500), (~0), (-1);
+insert ignore into t1 values (500), (-500), (~0), (-1);
Warnings:
Warning 1264 Out of range value for column 'quantity' at row 1
Warning 1264 Out of range value for column 'quantity' at row 2
diff --git a/mysql-test/r/bug13633383.result b/mysql-test/r/bug13633383.result
index a6f5bab5260..9c83c184bf2 100644
--- a/mysql-test/r/bug13633383.result
+++ b/mysql-test/r/bug13633383.result
@@ -14,6 +14,7 @@ CREATE TABLE t1 (
`col440` tinyblob NOT NULL,
`col441` double unsigned DEFAULT NULL
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
`a` geometry DEFAULT NULL,
`col460` date DEFAULT NULL,
@@ -25,6 +26,7 @@ CREATE TABLE t2 (
`col466` varchar(236) CHARACTER SET utf8 NOT NULL,
`col467` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3 (
`FTS_DOC_ID` bigint(20) unsigned NOT NULL,
`col577` datetime DEFAULT NULL,
@@ -34,6 +36,8 @@ CREATE TABLE t3 (
`col583` geometry DEFAULT NULL,
`col584` bit(47) NOT NULL
);
+Warnings:
+Warning 1264 Out of range value for column 'col460' at row 1
set session sort_buffer_size= 32768;
select col435
from t3
diff --git a/mysql-test/r/case.result b/mysql-test/r/case.result
index 5a02ca22392..ab6ae5e6a5a 100644
--- a/mysql-test/r/case.result
+++ b/mysql-test/r/case.result
@@ -40,15 +40,23 @@ select (CASE "two" when "one" then 1.00 WHEN "two" then 2.00 END) +0.0;
select case 1/0 when "a" then "true" else "false" END;
case 1/0 when "a" then "true" else "false" END
false
+Warnings:
+Warning 1365 Division by 0
select case 1/0 when "a" then "true" END;
case 1/0 when "a" then "true" END
NULL
+Warnings:
+Warning 1365 Division by 0
select (case 1/0 when "a" then "true" END) | 0;
(case 1/0 when "a" then "true" END) | 0
NULL
+Warnings:
+Warning 1365 Division by 0
select (case 1/0 when "a" then "true" END) + 0.0;
(case 1/0 when "a" then "true" END) + 0.0
NULL
+Warnings:
+Warning 1365 Division by 0
select case when 1>0 then "TRUE" else "FALSE" END;
case when 1>0 then "TRUE" else "FALSE" END
TRUE
@@ -99,8 +107,8 @@ CASE WHEN 1 THEN 0.1e1 else '1' END AS c12
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL,
- `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci NOT NULL,
+ `c1` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci DEFAULT NULL,
+ `c2` varchar(1) CHARACTER SET latin1 COLLATE latin1_danish_ci DEFAULT NULL,
`c3` varchar(1) NOT NULL,
`c4` varchar(1) NOT NULL,
`c5` varchar(4) NOT NULL,
@@ -157,7 +165,7 @@ t1 CREATE TABLE `t1` (
`COALESCE(1,1.0)` decimal(2,1) NOT NULL,
`COALESCE(1,'1')` varchar(1) NOT NULL,
`COALESCE(1.1,'1')` varchar(4) NOT NULL,
- `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
CREATE TABLE t1 SELECT IFNULL('a' COLLATE latin1_swedish_ci, 'b' COLLATE latin1_bin);
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result
index 2edacb6c7e9..4b1da9895fb 100644
--- a/mysql-test/r/cast.result
+++ b/mysql-test/r/cast.result
@@ -43,6 +43,8 @@ cast(5 as unsigned) -6.0
select cast(NULL as signed), cast(1/0 as signed);
cast(NULL as signed) cast(1/0 as signed)
NULL NULL
+Warnings:
+Warning 1365 Division by 0
select cast(1 as double(5,2));
cast(1 as double(5,2))
1.00
@@ -160,6 +162,8 @@ cast(cast("2011-04-05 8:46:06.123456" AS datetime(6)) as time(6))
select cast(NULL as unsigned), cast(1/0 as unsigned);
cast(NULL as unsigned) cast(1/0 as unsigned)
NULL NULL
+Warnings:
+Warning 1365 Division by 0
select cast("A" as binary) = "a", cast(BINARY "a" as CHAR) = "A";
cast("A" as binary) = "a" cast(BINARY "a" as CHAR) = "A"
0 1
@@ -404,7 +408,7 @@ create table t1 select cast(_koi8r'ÔÅÓÔ' as char character set cp1251) as t;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `t` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `t` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select
@@ -423,6 +427,7 @@ cast(1000 as CHAR(3))
100
Warnings:
Warning 1292 Truncated incorrect BINARY(3) value: '1000'
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 select
cast(_latin1'ab' AS char) as c1,
cast(_latin1'a ' AS char) as c2,
@@ -432,6 +437,7 @@ cast(_latin1'a' AS char(2)) as c5;
Warnings:
Warning 1292 Truncated incorrect BINARY(2) value: 'abc'
Warning 1292 Truncated incorrect BINARY(2) value: 'a '
+set sql_mode = DEFAULT;
select c1,c2,c3,c4,hex(c5) from t1;
c1 c2 c3 c4 hex(c5)
ab a ab a 6100
@@ -456,6 +462,7 @@ c1 c2 c3 c4 c5
Warnings:
Warning 1292 Truncated incorrect CHAR(2) value: 'фгх'
Warning 1292 Truncated incorrect CHAR(2) value: 'ф '
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 select
cast(_koi8r'ÆÇ' AS nchar) as c1,
cast(_koi8r'Æ ' AS nchar) as c2,
@@ -465,6 +472,7 @@ cast(_koi8r'Æ' AS nchar(2)) as c5;
Warnings:
Warning 1292 Truncated incorrect CHAR(2) value: 'фгх'
Warning 1292 Truncated incorrect CHAR(2) value: 'ф '
+set sql_mode = DEFAULT;
select * from t1;
c1 c2 c3 c4 c5
фг ф фг ф ф
@@ -586,8 +594,8 @@ t1 CREATE TABLE `t1` (
`cast(1 as signed)` int(1) NOT NULL,
`cast(1 as double(5,2))` double(5,2) DEFAULT NULL,
`cast(1 as decimal(5,3))` decimal(5,3) NOT NULL,
- `cast("A" as binary)` varbinary(1) NOT NULL,
- `cast("A" as char(100))` varbinary(100) NOT NULL,
+ `cast("A" as binary)` varbinary(1) DEFAULT NULL,
+ `cast("A" as char(100))` varbinary(100) DEFAULT NULL,
`cast("2001-1-1" as DATE)` date DEFAULT NULL,
`cast("2001-1-1" as DATETIME)` datetime DEFAULT NULL,
`cast("1:2:3" as TIME)` time DEFAULT NULL
@@ -746,11 +754,13 @@ DROP TABLE t1;
# LONGTEXT, UNION, USER VARIABLE
# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)),
CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED));
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -762,10 +772,14 @@ DROP TABLE t1;
End of 5.1 tests
select cast("2101-00-01 02:03:04" as datetime);
cast("2101-00-01 02:03:04" as datetime)
-2101-00-01 02:03:04
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04'
select cast(cast("2101-00-01 02:03:04" as datetime) as time);
cast(cast("2101-00-01 02:03:04" as datetime) as time)
-02:03:04
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2101-00-01 02:03:04'
SELECT CAST(CAST('20:05:05' AS TIME) as date);
CAST(CAST('20:05:05' AS TIME) as date)
2001-02-03
diff --git a/mysql-test/r/comment_column.result b/mysql-test/r/comment_column.result
index 552a83da472..754e2153af5 100644
--- a/mysql-test/r/comment_column.result
+++ b/mysql-test/r/comment_column.result
@@ -236,9 +236,11 @@ t1 CREATE TABLE `t1` (
`c10` int(11) DEFAULT NULL COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd',
KEY `i2` (`c2`)
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
Warnings:
Warning 1629 Comment for field 'c11' is too long (max = 1024)
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd 1024
diff --git a/mysql-test/r/comment_index.result b/mysql-test/r/comment_index.result
index 599bf563ca4..7c39395b791 100644
--- a/mysql-test/r/comment_index.result
+++ b/mysql-test/r/comment_index.result
@@ -265,9 +265,11 @@ t1 CREATE TABLE `t1` (
KEY `i10` (`c10`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd',
KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
Warnings:
Warning 1688 Comment for index 'i11' is too long (max = 1024)
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd 1024
@@ -317,9 +319,11 @@ t1 CREATE TABLE `t1` (
KEY `i1_3` (`c1`,`c2`,`c3`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd',
KEY `i11` (`c11`) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
) ENGINE=ENGINE DEFAULT CHARSET=latin1 COMMENT='ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
Warnings:
Warning 1688 Comment for index 'c13' is too long (max = 1024)
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
table_comment char_length(table_comment)
ABCDEFGHIJabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd 1024
diff --git a/mysql-test/r/commit_1innodb.result b/mysql-test/r/commit_1innodb.result
index 514f0a67c7f..1adba7b4c4c 100644
--- a/mysql-test/r/commit_1innodb.result
+++ b/mysql-test/r/commit_1innodb.result
@@ -264,7 +264,7 @@ rollback;
select * from t2;
a
insert into t2 (a) values (1026);
-load data infile "../../std_data/words.dat" into table t1 (a) set a:=f2(26);
+load data infile "../../std_data/words.dat" ignore into table t1 (a) set a:=f2(26);
ERROR 23000: Duplicate entry '26' for key 'a'
select * from t2;
a
diff --git a/mysql-test/r/compound.result b/mysql-test/r/compound.result
index 1d412e671a4..749c6eeaea7 100644
--- a/mysql-test/r/compound.result
+++ b/mysql-test/r/compound.result
@@ -155,7 +155,7 @@ drop function fn|
drop table t1|
begin not atomic select @@sql_mode; end|
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
create table t1 (a int)|
select a from t1 having a > 1|
a
diff --git a/mysql-test/r/compress.result b/mysql-test/r/compress.result
index 762ab6630d8..11db7821c11 100644
--- a/mysql-test/r/compress.result
+++ b/mysql-test/r/compress.result
@@ -2099,6 +2099,7 @@ t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
ver_nr int(11) NOT NULL default '0',
@@ -2148,6 +2149,7 @@ KEY mcbs_aufnr(mcbs_aufnr),
KEY kundentyp(kundentyp),
KEY p_nr(p_nr,suffix)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result
index f9ac0dd4c7f..341fed8885f 100644
--- a/mysql-test/r/create.result
+++ b/mysql-test/r/create.result
@@ -71,7 +71,7 @@ select * from t1;
a
abcde
alter table t1 alter column a set default 'abcdef';
-ERROR 42000: Invalid default value for 'a'
+ERROR 22001: Data too long for column 'a' at row 1
drop table t1;
create table 1ea10 (1a20 int,1e int);
insert into 1ea10 values(1,1);
@@ -484,10 +484,10 @@ a int(11) YES NULL
b bigint(11) NO NULL
c bigint(10) unsigned NO NULL
d date YES NULL
-e varchar(1) NO NULL
+e varchar(1) YES NULL
f datetime YES NULL
g time YES NULL
-h longblob NO NULL
+h longblob YES NULL
dd time YES NULL
select * from t2;
a b c d e f g h dd
@@ -495,7 +495,9 @@ a b c d e f g h dd
2 -2 2 1825-12-14 a 2003-01-01 03:02:01 04:03:02 binary data 02:00:00
drop table t1, t2;
create table t1 (a tinyint, b smallint, c mediumint, d int, e bigint, f float(3,2), g double(4,3), h decimal(5,4), i year, j date, k timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, l datetime, m enum('a','b'), n set('a','b'), o char(10));
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select ifnull(a,a), ifnull(b,b), ifnull(c,c), ifnull(d,d), ifnull(e,e), ifnull(f,f), ifnull(g,g), ifnull(h,h), ifnull(i,i), ifnull(j,j), ifnull(k,k), ifnull(l,l), ifnull(m,m), ifnull(n,n), ifnull(o,o) from t1;
+set sql_mode = DEFAULT;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -544,6 +546,7 @@ name varchar(10) YES NULL
age smallint(6) YES -1
drop table t1, t2;
create table t1(cenum enum('a'), cset set('b'));
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2(cenum enum('a','a'), cset set('b','b'));
Warnings:
Note 1291 Column 'cenum' has duplicated value 'a' in ENUM
@@ -556,6 +559,9 @@ Note 1291 Column 'cenum' has duplicated value 'c' in ENUM
Note 1291 Column 'cset' has duplicated value 'b' in SET
Note 1291 Column 'cset' has duplicated value 'B' in SET
Note 1291 Column 'cset' has duplicated value 'd' in SET
+set sql_mode = DEFAULT;
+create table t4(cenum enum('a','a'), cset set('b','b'));
+ERROR HY000: Column 'cenum' has duplicated value 'a' in ENUM
drop table t1, t2, t3;
create database mysqltest;
use mysqltest;
@@ -720,12 +726,14 @@ t1 CREATE TABLE `t1` (
PRIMARY KEY (`a`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(12) charset utf8 collate utf8_bin not null,
b int not null, primary key (a)
) select a, 1 as c from t2 ;
Warnings:
Warning 1364 Field 'b' doesn't have a default value
+set sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1195,7 +1203,9 @@ DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t2;
DROP TABLE IF EXISTS t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1(c1 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c2 TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET sql_mode = NO_ZERO_DATE;
@@ -1892,9 +1902,11 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
set @@session.collation_server=filename;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1(a enum('',''));
Warnings:
Note 1291 Column 'a' has duplicated value '' in ENUM
+set sql_mode = DEFAULT;
drop table t1;
set @@session.collation_server=default;
#
diff --git a/mysql-test/r/create_drop_function.result b/mysql-test/r/create_drop_function.result
index e9db636ab87..c447fd5ef89 100644
--- a/mysql-test/r/create_drop_function.result
+++ b/mysql-test/r/create_drop_function.result
@@ -4,7 +4,7 @@ RETURNS CHAR(100)
RETURN CONCAT('Hello, ', str, '!');
SELECT * FROM mysql.proc WHERE name like 'f1';
db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment character_set_client collation_connection db_collation body_utf8
-test f1 FUNCTION f1 SQL CONTAINS_SQL NO DEFINER str char(20) char(100) CHARSET latin1 RETURN CONCAT('Hello, ', str, '!') root@localhost 2014-09-30 08:00:00 2014-09-30 08:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci RETURN CONCAT('Hello, ', str, '!')
+test f1 FUNCTION f1 SQL CONTAINS_SQL NO DEFINER str char(20) char(100) CHARSET latin1 RETURN CONCAT('Hello, ', str, '!') root@localhost 2014-09-30 08:00:00 2014-09-30 08:00:00 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci RETURN CONCAT('Hello, ', str, '!')
SELECT f1('world');
f1('world')
Hello, world!
diff --git a/mysql-test/r/ctype_big5.result b/mysql-test/r/ctype_big5.result
index 43cac266bf3..3c184c8aec9 100644
--- a/mysql-test/r/ctype_big5.result
+++ b/mysql-test/r/ctype_big5.result
@@ -55,7 +55,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -224,30 +224,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
@@ -466,30 +454,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SELECT strcmp('a','a '), strcmp('a ','a');
strcmp('a','a ') strcmp('a ','a')
@@ -540,7 +516,7 @@ E5ABBA
drop table t1;
select hex(convert(_big5 0xC84041 using ucs2));
hex(convert(_big5 0xC84041 using ucs2))
-003F0041
+NULL
Warnings:
Warning 1977 Cannot convert 'big5' character 0xC840 to 'ucs2'
End of 4.1 tests
@@ -587,7 +563,7 @@ t1 CREATE TABLE `t1` (
SELECT COUNT(*) FROM t1;
COUNT(*)
28672
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -820,69 +796,69 @@ A2C1 ⅹ
A2C2 Ⅹ
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -899,69 +875,69 @@ C7DA с
C7DB т
Warnings:
Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C7 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C8 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3C9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3CF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D0 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D1 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D2 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D3 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D4 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D5 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D6 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D7 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D8 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3D9 to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DA to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DB to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DC to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DD to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DE to 'utf8'
-Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
Warning 1977 Cannot convert 'big5' character 0xA3DF to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E1 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E3 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E5 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E7 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3E9 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EB to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3ED to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3EF to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F0 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F1 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F2 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F3 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F4 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F5 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F6 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F7 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F8 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3F9 to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FA to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FB to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FC to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FD to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xA3FE to 'utf8'
+Warning 1977 Cannot convert 'big5' character 0xC7FD to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
@@ -1000,7 +976,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET big5 NOT NULL
+ `a` varchar(5) CHARACTER SET big5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1259,7 +1235,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET big5 COLLATE big5_bin NOT NULL
+ `a` varchar(5) CHARACTER SET big5 COLLATE big5_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1497,6 +1473,7 @@ A1A1A1A1A1A120202020202020202020202020202020202020
# Start of 10.0 tests
#
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -4559,6 +4536,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
SET NAMES big5;
# Start of ctype_E05C.inc
@@ -4602,7 +4580,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET big5 NOT NULL
+ `a` varchar(10) CHARACTER SET big5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\'),('à\t');
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
@@ -4641,7 +4619,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET big5 NOT NULL
+ `a` varchar(10) CHARACTER SET big5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
@@ -4680,7 +4658,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET big5 NOT NULL
+ `a` varchar(10) CHARACTER SET big5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
@@ -4726,7 +4704,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET big5 NOT NULL
+ `a` varchar(10) CHARACTER SET big5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
@@ -4746,7 +4724,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(10) NOT NULL
+ `a` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
diff --git a/mysql-test/r/ctype_binary.result b/mysql-test/r/ctype_binary.result
index 90ff932fbc9..373e1c8d10b 100644
--- a/mysql-test/r/ctype_binary.result
+++ b/mysql-test/r/ctype_binary.result
@@ -13,7 +13,7 @@ create table t1 as select concat(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -26,7 +26,7 @@ create table t1 as select concat(18446744073709551615) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(20) NOT NULL
+ `c1` varbinary(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -39,7 +39,7 @@ create table t1 as select concat(1.1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -52,7 +52,7 @@ create table t1 as select concat(1+2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1-2));
@@ -62,7 +62,7 @@ create table t1 as select concat(1-2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1*2));
@@ -72,7 +72,7 @@ create table t1 as select concat(1*2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1/2));
@@ -112,7 +112,7 @@ create table t1 as select concat(-1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-(1+2)));
@@ -122,7 +122,7 @@ create table t1 as select concat(-(1+2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1|2));
@@ -132,7 +132,7 @@ create table t1 as select concat(1|2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1&2));
@@ -142,7 +142,7 @@ create table t1 as select concat(1&2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_count(12)));
@@ -152,7 +152,7 @@ create table t1 as select concat(bit_count(12)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2<<1));
@@ -162,7 +162,7 @@ create table t1 as select concat(2<<1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2>>1));
@@ -172,7 +172,7 @@ create table t1 as select concat(2>>1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(~0));
@@ -182,7 +182,7 @@ create table t1 as select concat(~0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(3^2));
@@ -192,7 +192,7 @@ create table t1 as select concat(3^2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(abs(-2)));
@@ -202,7 +202,7 @@ create table t1 as select concat(abs(-2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(concat(exp(2)),1));
@@ -332,7 +332,7 @@ create table t1 as select concat(degrees(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(23) NOT NULL
+ `c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(radians(0)));
@@ -342,7 +342,7 @@ create table t1 as select concat(radians(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(23) NOT NULL
+ `c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ceiling(0.5)));
@@ -352,7 +352,7 @@ create table t1 as select concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
@@ -362,7 +362,7 @@ create table t1 as select concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -372,7 +372,7 @@ create table t1 as select concat(round(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sign(0.5)));
@@ -382,14 +382,14 @@ create table t1 as select concat(sign(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(rand()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(23) NOT NULL
+ `c1` varbinary(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(length('a')));
@@ -399,7 +399,7 @@ create table t1 as select concat(length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(char_length('a')));
@@ -409,7 +409,7 @@ create table t1 as select concat(char_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_length('a')));
@@ -419,7 +419,7 @@ create table t1 as select concat(bit_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coercibility('a')));
@@ -429,7 +429,7 @@ create table t1 as select concat(coercibility('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(locate('a','a')));
@@ -439,7 +439,7 @@ create table t1 as select concat(locate('a','a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(11) NOT NULL
+ `c1` varbinary(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(field('c','a','b','c')));
@@ -449,7 +449,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ascii(61)));
@@ -459,7 +459,7 @@ create table t1 as select concat(ascii(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ord(61)));
@@ -469,7 +469,7 @@ create table t1 as select concat(ord(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(find_in_set('b','a,b,c,d')));
@@ -479,7 +479,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select md5('a'), hex(md5('a'));
@@ -489,7 +489,7 @@ create table t1 as select md5('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(32) NOT NULL
+ `c1` varbinary(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select old_password('a'), hex(old_password('a'));
@@ -499,7 +499,7 @@ create table t1 as select old_password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(16) NOT NULL
+ `c1` varbinary(16) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select password('a'), hex(password('a'));
@@ -509,7 +509,7 @@ create table t1 as select password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(41) NOT NULL
+ `c1` varbinary(41) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha('a'), hex(sha('a'));
@@ -519,7 +519,7 @@ create table t1 as select sha('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(40) NOT NULL
+ `c1` varbinary(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha1('a'), hex(sha1('a'));
@@ -529,7 +529,7 @@ create table t1 as select sha1('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(40) NOT NULL
+ `c1` varbinary(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('-1' as signed)));
@@ -539,7 +539,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('1' as unsigned)));
@@ -549,7 +549,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast(1/2 as decimal(5,5))));
@@ -608,7 +608,7 @@ create table t1 as select concat(least(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(greatest(1,2)));
@@ -618,7 +618,7 @@ create table t1 as select concat(greatest(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(case when 11 then 22 else 33 end));
@@ -628,7 +628,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coalesce(1,2)));
@@ -638,7 +638,7 @@ create table t1 as select concat(coalesce(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat_ws(1,2,3));
@@ -648,7 +648,7 @@ create table t1 as select concat_ws(1,2,3) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(group_concat(1,2,3));
@@ -676,7 +676,7 @@ create table t1 as select concat(last_insert_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(benchmark(0,0)));
@@ -686,7 +686,7 @@ create table t1 as select concat(benchmark(0,0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sleep(0)));
@@ -696,7 +696,7 @@ create table t1 as select concat(sleep(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(is_free_lock('xxxx')));
@@ -730,7 +730,7 @@ create table t1 as select concat(crc32('')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(uncompressed_length('')));
@@ -747,7 +747,7 @@ create table t1 as select concat(connection_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(inet_aton('127.1.1.1')));
@@ -783,7 +783,7 @@ create table t1 as select concat(row_count()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(found_rows()));
@@ -793,21 +793,21 @@ create table t1 as select concat(found_rows()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid_short()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(21) NOT NULL
+ `c1` varbinary(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
@@ -820,7 +820,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(37) NOT NULL
+ `c1` varchar(37) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1;
@@ -840,7 +840,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL,
+ `c1` varbinary(1) DEFAULT NULL,
`c2` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -898,7 +898,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL,
+ `c1` varbinary(4) DEFAULT NULL,
`c2` decimal(2,1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -937,7 +937,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a'='a' IS NOT TRUE));
@@ -947,7 +947,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(NOT 'a'='a'));
@@ -957,7 +957,7 @@ create table t1 as select concat(NOT 'a'='a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NULL));
@@ -967,7 +967,7 @@ create table t1 as select concat('a' IS NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NOT NULL));
@@ -977,7 +977,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' rlike 'a'));
@@ -987,7 +987,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(strcmp('a','b')));
@@ -997,7 +997,7 @@ create table t1 as select concat(strcmp('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' like 'a'));
@@ -1007,7 +1007,7 @@ create table t1 as select concat('a' like 'b') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' between 'b' and 'c'));
@@ -1017,7 +1017,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' in ('a','b')));
@@ -1027,7 +1027,7 @@ create table t1 as select concat('a' in ('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(interval(23, 1, 15, 17, 30, 44, 200)));
@@ -1037,7 +1037,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a varchar(10), fulltext key(a));
@@ -1069,7 +1069,7 @@ create table t1 as select concat(ifnull(1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ifnull(1.1,1.1)));
@@ -1079,7 +1079,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(if(1,'b',1));
@@ -1109,7 +1109,7 @@ create table t1 as select concat(if(1,1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(nullif(1,2)));
@@ -1274,15 +1274,17 @@ create table t1 as select concat(period_add(200902, 2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(6) NOT NULL
+ `c1` varbinary(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(period_diff(200902, 200802)));
hex(concat(period_diff(200902, 200802)))
3132
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as select concat(period_add(200902, 200802)) as c1;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1483,21 +1485,21 @@ create table t1 as select concat(curdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_date()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(curtime()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat('a',20) as c1 limit 0;
@@ -1513,7 +1515,7 @@ create table t1 as select concat(utc_time()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sec_to_time(2378)));
@@ -1606,21 +1608,21 @@ create table t1 as select concat(now()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(19) NOT NULL
+ `c1` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_timestamp()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(19) NOT NULL
+ `c1` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(sysdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(19) NOT NULL
+ `c1` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(addtime('00:00:00','11:22:33')));
@@ -1660,7 +1662,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(127) NOT NULL
+ `c1` varbinary(127) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(insert(1133,3,0,22));
@@ -1670,7 +1672,7 @@ create table t1 as select insert(1133,3,0,22) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(6) NOT NULL
+ `c1` varbinary(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lcase(123));
@@ -1680,7 +1682,7 @@ create table t1 as select lcase(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(123,1));
@@ -1690,7 +1692,7 @@ create table t1 as select left(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lower(123));
@@ -1700,7 +1702,7 @@ create table t1 as select lower(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(3) NOT NULL
+ `c1` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lpad(1,2,0));
@@ -1710,7 +1712,7 @@ create table t1 as select lpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ltrim(1));
@@ -1720,7 +1722,7 @@ create table t1 as select ltrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(mid(1,1,1));
@@ -1730,7 +1732,7 @@ create table t1 as select mid(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(repeat(1,2));
@@ -1740,7 +1742,7 @@ create table t1 as select repeat(1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(replace(1,1,2));
@@ -1750,7 +1752,7 @@ create table t1 as select replace(1,1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(reverse(12));
@@ -1760,7 +1762,7 @@ create table t1 as select reverse(12) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(right(123,1));
@@ -1770,7 +1772,7 @@ create table t1 as select right(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rpad(1,2,0));
@@ -1780,7 +1782,7 @@ create table t1 as select rpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(2) NOT NULL
+ `c1` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rtrim(1));
@@ -1790,7 +1792,7 @@ create table t1 as select rtrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(soundex(1));
@@ -1800,7 +1802,7 @@ create table t1 as select soundex(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(4) NOT NULL
+ `c1` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(substring(1,1,1));
@@ -1810,7 +1812,7 @@ create table t1 as select substring(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(trim(1));
@@ -1820,7 +1822,7 @@ create table t1 as select trim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ucase(1));
@@ -1830,7 +1832,7 @@ create table t1 as select ucase(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(upper(1));
@@ -1840,14 +1842,14 @@ create table t1 as select upper(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(1) NOT NULL
+ `c1` varbinary(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat(' ', 64) as a limit 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(64) NOT NULL
+ `a` varbinary(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ("1.1"), ("2.1");
select a, hex(a) from t1;
@@ -2077,7 +2079,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -2097,7 +2101,7 @@ create table t2 as select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `concat(a)` varbinary(19) NOT NULL
+ `concat(a)` varbinary(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a date);
@@ -2389,14 +2393,16 @@ hex(a)
drop table t1;
drop view v1;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
create view v1(a) as select concat(a) from t1;
show columns from v1;
Field Type Null Key Default Extra
-a varbinary(19) NO
+a varbinary(19) YES NULL
select hex(a) from v1;
hex(a)
303030302D30302D30302030303A30303A3030
@@ -2647,14 +2653,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `CONCAT_WS(1,2,3)` varbinary(3) NOT NULL
+ `CONCAT_WS(1,2,3)` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `INSERT(1133,3,0,22)` varbinary(6) NOT NULL
+ `INSERT(1133,3,0,22)` varbinary(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LCASE(a) FROM t1;
@@ -2675,35 +2681,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPEAT(1,2)` varbinary(2) NOT NULL
+ `REPEAT(1,2)` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LEFT(123,2)` varbinary(2) NOT NULL
+ `LEFT(123,2)` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RIGHT(123,2)` varbinary(2) NOT NULL
+ `RIGHT(123,2)` varbinary(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LTRIM(123)` varbinary(3) NOT NULL
+ `LTRIM(123)` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RTRIM(123)` varbinary(3) NOT NULL
+ `RTRIM(123)` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1;
@@ -2717,35 +2723,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPLACE(111,2,3)` varbinary(3) NOT NULL
+ `REPLACE(111,2,3)` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SUBSTRING_INDEX(111,111,1)` varbinary(3) NOT NULL
+ `SUBSTRING_INDEX(111,111,1)` varbinary(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `MAKE_SET(111,222,3)` varbinary(5) NOT NULL
+ `MAKE_SET(111,222,3)` varbinary(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SOUNDEX(1)` varbinary(4) NOT NULL
+ `SOUNDEX(1)` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `EXPORT_SET(1,'Y','N','',8)` varbinary(64) NOT NULL
+ `EXPORT_SET(1,'Y','N','',8)` varbinary(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -2935,7 +2941,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -2956,7 +2962,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -2977,7 +2983,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -2998,7 +3004,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varbinary(10) NOT NULL
+ `c1` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -3023,7 +3029,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(10) NOT NULL
+ `a` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
diff --git a/mysql-test/r/ctype_collate.result b/mysql-test/r/ctype_collate.result
index 27cae7e3c7b..a91e583f21f 100644
--- a/mysql-test/r/ctype_collate.result
+++ b/mysql-test/r/ctype_collate.result
@@ -649,7 +649,7 @@ select least(_latin1'a',_latin2'b',_latin5'c' collate latin5_turkish_ci) as f1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f1` varchar(1) CHARACTER SET latin5 NOT NULL
+ `f1` varchar(1) CHARACTER SET latin5 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select case _latin1'a' when _latin2'b' then 1 when _latin5'c' collate
diff --git a/mysql-test/r/ctype_cp1250_ch.result b/mysql-test/r/ctype_cp1250_ch.result
index 173fcccb873..d4f75778ace 100644
--- a/mysql-test/r/ctype_cp1250_ch.result
+++ b/mysql-test/r/ctype_cp1250_ch.result
@@ -59,7 +59,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -112,7 +112,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -135,7 +135,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -158,7 +158,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -181,7 +181,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -207,7 +207,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -281,7 +281,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -510,7 +510,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET cp1250 COLLATE cp1250_czech_cs NOT NULL
+ `a` varchar(5) CHARACTER SET cp1250 COLLATE cp1250_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_cp1251.result b/mysql-test/r/ctype_cp1251.result
index 205b0e1c93f..99114ef8e0c 100644
--- a/mysql-test/r/ctype_cp1251.result
+++ b/mysql-test/r/ctype_cp1251.result
@@ -281,7 +281,7 @@ chr upper lower utf8 roundtrip issafe
95 95 95 E280A2 95
96 96 96 E28093 96
97 97 97 E28094 97
-98 98 98 3F 3F Round trip unsafe
+98 98 98 NULL NULL Round trip unsafe
99 99 99 E284A2 99
9A 9A 9A D199 9A
9B 9B 9B E280BA 9B
@@ -422,7 +422,7 @@ create table t1 as select concat(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -435,7 +435,7 @@ create table t1 as select concat(18446744073709551615) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(20) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(20) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -448,7 +448,7 @@ create table t1 as select concat(1.1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -461,7 +461,7 @@ create table t1 as select concat(1+2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1-2));
@@ -471,7 +471,7 @@ create table t1 as select concat(1-2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1*2));
@@ -481,7 +481,7 @@ create table t1 as select concat(1*2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1/2));
@@ -521,7 +521,7 @@ create table t1 as select concat(-1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-(1+2)));
@@ -531,7 +531,7 @@ create table t1 as select concat(-(1+2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1|2));
@@ -541,7 +541,7 @@ create table t1 as select concat(1|2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1&2));
@@ -551,7 +551,7 @@ create table t1 as select concat(1&2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_count(12)));
@@ -561,7 +561,7 @@ create table t1 as select concat(bit_count(12)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2<<1));
@@ -571,7 +571,7 @@ create table t1 as select concat(2<<1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2>>1));
@@ -581,7 +581,7 @@ create table t1 as select concat(2>>1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(~0));
@@ -591,7 +591,7 @@ create table t1 as select concat(~0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(3^2));
@@ -601,7 +601,7 @@ create table t1 as select concat(3^2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(abs(-2)));
@@ -611,7 +611,7 @@ create table t1 as select concat(abs(-2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(concat(exp(2)),1));
@@ -741,7 +741,7 @@ create table t1 as select concat(degrees(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(radians(0)));
@@ -751,7 +751,7 @@ create table t1 as select concat(radians(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ceiling(0.5)));
@@ -761,7 +761,7 @@ create table t1 as select concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
@@ -771,7 +771,7 @@ create table t1 as select concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -781,7 +781,7 @@ create table t1 as select concat(round(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sign(0.5)));
@@ -791,14 +791,14 @@ create table t1 as select concat(sign(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(rand()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(23) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(length('a')));
@@ -808,7 +808,7 @@ create table t1 as select concat(length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(char_length('a')));
@@ -818,7 +818,7 @@ create table t1 as select concat(char_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_length('a')));
@@ -828,7 +828,7 @@ create table t1 as select concat(bit_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coercibility('a')));
@@ -838,7 +838,7 @@ create table t1 as select concat(coercibility('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(locate('a','a')));
@@ -848,7 +848,7 @@ create table t1 as select concat(locate('a','a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(11) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(11) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(field('c','a','b','c')));
@@ -858,7 +858,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ascii(61)));
@@ -868,7 +868,7 @@ create table t1 as select concat(ascii(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ord(61)));
@@ -878,7 +878,7 @@ create table t1 as select concat(ord(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(find_in_set('b','a,b,c,d')));
@@ -888,7 +888,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select md5('a'), hex(md5('a'));
@@ -898,7 +898,7 @@ create table t1 as select md5('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(32) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(32) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select old_password('a'), hex(old_password('a'));
@@ -908,7 +908,7 @@ create table t1 as select old_password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(16) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(16) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select password('a'), hex(password('a'));
@@ -918,7 +918,7 @@ create table t1 as select password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(41) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(41) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha('a'), hex(sha('a'));
@@ -928,7 +928,7 @@ create table t1 as select sha('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(40) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha1('a'), hex(sha1('a'));
@@ -938,7 +938,7 @@ create table t1 as select sha1('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(40) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('-1' as signed)));
@@ -948,7 +948,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('1' as unsigned)));
@@ -958,7 +958,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast(1/2 as decimal(5,5))));
@@ -1017,7 +1017,7 @@ create table t1 as select concat(least(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(greatest(1,2)));
@@ -1027,7 +1027,7 @@ create table t1 as select concat(greatest(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(case when 11 then 22 else 33 end));
@@ -1037,7 +1037,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coalesce(1,2)));
@@ -1047,7 +1047,7 @@ create table t1 as select concat(coalesce(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat_ws(1,2,3));
@@ -1057,7 +1057,7 @@ create table t1 as select concat_ws(1,2,3) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(group_concat(1,2,3));
@@ -1085,7 +1085,7 @@ create table t1 as select concat(last_insert_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(benchmark(0,0)));
@@ -1095,7 +1095,7 @@ create table t1 as select concat(benchmark(0,0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sleep(0)));
@@ -1105,7 +1105,7 @@ create table t1 as select concat(sleep(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(is_free_lock('xxxx')));
@@ -1139,7 +1139,7 @@ create table t1 as select concat(crc32('')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(uncompressed_length('')));
@@ -1156,7 +1156,7 @@ create table t1 as select concat(connection_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(inet_aton('127.1.1.1')));
@@ -1192,7 +1192,7 @@ create table t1 as select concat(row_count()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(found_rows()));
@@ -1202,21 +1202,21 @@ create table t1 as select concat(found_rows()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid_short()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(21) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
@@ -1229,7 +1229,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(37) NOT NULL
+ `c1` varchar(37) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1;
@@ -1249,7 +1249,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL,
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL,
`c2` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -1307,7 +1307,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL,
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL,
`c2` decimal(2,1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -1346,7 +1346,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a'='a' IS NOT TRUE));
@@ -1356,7 +1356,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(NOT 'a'='a'));
@@ -1366,7 +1366,7 @@ create table t1 as select concat(NOT 'a'='a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NULL));
@@ -1376,7 +1376,7 @@ create table t1 as select concat('a' IS NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NOT NULL));
@@ -1386,7 +1386,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' rlike 'a'));
@@ -1396,7 +1396,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(strcmp('a','b')));
@@ -1406,7 +1406,7 @@ create table t1 as select concat(strcmp('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' like 'a'));
@@ -1416,7 +1416,7 @@ create table t1 as select concat('a' like 'b') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' between 'b' and 'c'));
@@ -1426,7 +1426,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' in ('a','b')));
@@ -1436,7 +1436,7 @@ create table t1 as select concat('a' in ('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(interval(23, 1, 15, 17, 30, 44, 200)));
@@ -1446,7 +1446,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a varchar(10), fulltext key(a));
@@ -1478,7 +1478,7 @@ create table t1 as select concat(ifnull(1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ifnull(1.1,1.1)));
@@ -1488,7 +1488,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(if(1,'b',1));
@@ -1518,7 +1518,7 @@ create table t1 as select concat(if(1,1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(nullif(1,2)));
@@ -1683,15 +1683,17 @@ create table t1 as select concat(period_add(200902, 2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(6) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(period_diff(200902, 200802)));
hex(concat(period_diff(200902, 200802)))
3132
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as select concat(period_add(200902, 200802)) as c1;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1892,21 +1894,21 @@ create table t1 as select concat(curdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_date()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(curtime()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat('a',20) as c1 limit 0;
@@ -1922,7 +1924,7 @@ create table t1 as select concat(utc_time()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(10) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sec_to_time(2378)));
@@ -2015,21 +2017,21 @@ create table t1 as select concat(now()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_timestamp()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(sysdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(19) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(addtime('00:00:00','11:22:33')));
@@ -2069,7 +2071,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(127) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(127) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(insert(1133,3,0,22));
@@ -2079,7 +2081,7 @@ create table t1 as select insert(1133,3,0,22) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(6) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lcase(123));
@@ -2089,7 +2091,7 @@ create table t1 as select lcase(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(123,1));
@@ -2099,7 +2101,7 @@ create table t1 as select left(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lower(123));
@@ -2109,7 +2111,7 @@ create table t1 as select lower(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lpad(1,2,0));
@@ -2119,7 +2121,7 @@ create table t1 as select lpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ltrim(1));
@@ -2129,7 +2131,7 @@ create table t1 as select ltrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(mid(1,1,1));
@@ -2139,7 +2141,7 @@ create table t1 as select mid(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(repeat(1,2));
@@ -2149,7 +2151,7 @@ create table t1 as select repeat(1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(replace(1,1,2));
@@ -2159,7 +2161,7 @@ create table t1 as select replace(1,1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(reverse(12));
@@ -2169,7 +2171,7 @@ create table t1 as select reverse(12) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(right(123,1));
@@ -2179,7 +2181,7 @@ create table t1 as select right(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rpad(1,2,0));
@@ -2189,7 +2191,7 @@ create table t1 as select rpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rtrim(1));
@@ -2199,7 +2201,7 @@ create table t1 as select rtrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(soundex(1));
@@ -2209,7 +2211,7 @@ create table t1 as select soundex(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(substring(1,1,1));
@@ -2219,7 +2221,7 @@ create table t1 as select substring(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(trim(1));
@@ -2229,7 +2231,7 @@ create table t1 as select trim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ucase(1));
@@ -2239,7 +2241,7 @@ create table t1 as select ucase(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(upper(1));
@@ -2249,14 +2251,14 @@ create table t1 as select upper(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET cp1251 NOT NULL
+ `c1` varchar(1) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat(' ', 64) as a limit 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET cp1251 NOT NULL
+ `a` varchar(64) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ("1.1"), ("2.1");
select a, hex(a) from t1;
@@ -2486,7 +2488,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -2506,7 +2510,7 @@ create table t2 as select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `concat(a)` varchar(19) CHARACTER SET cp1251 NOT NULL
+ `concat(a)` varchar(19) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a date);
@@ -2798,14 +2802,16 @@ hex(a)
drop table t1;
drop view v1;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
create view v1(a) as select concat(a) from t1;
show columns from v1;
Field Type Null Key Default Extra
-a varchar(19) NO
+a varchar(19) YES NULL
select hex(a) from v1;
hex(a)
303030302D30302D30302030303A30303A3030
@@ -3056,14 +3062,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET cp1251 NOT NULL
+ `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LCASE(a) FROM t1;
@@ -3084,35 +3090,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPEAT(1,2)` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `REPEAT(1,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LEFT(123,2)` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `LEFT(123,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RIGHT(123,2)` varchar(2) CHARACTER SET cp1251 NOT NULL
+ `RIGHT(123,2)` varchar(2) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LTRIM(123)` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `LTRIM(123)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RTRIM(123)` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `RTRIM(123)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1;
@@ -3126,35 +3132,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPLACE(111,2,3)` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `REPLACE(111,2,3)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET cp1251 NOT NULL
+ `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET cp1251 NOT NULL
+ `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SOUNDEX(1)` varchar(4) CHARACTER SET cp1251 NOT NULL
+ `SOUNDEX(1)` varchar(4) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET cp1251 NOT NULL
+ `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET cp1251 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
diff --git a/mysql-test/r/ctype_cp932_binlog_stm.result b/mysql-test/r/ctype_cp932_binlog_stm.result
index 75d05aa9f0a..b958933cd12 100644
--- a/mysql-test/r/ctype_cp932_binlog_stm.result
+++ b/mysql-test/r/ctype_cp932_binlog_stm.result
@@ -86,7 +86,7 @@ FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN 'A1' AND 'DF')
AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
-INSERT t1 (code) SELECT head FROM head
+INSERT IGNORE t1 (code) SELECT head FROM head
WHERE (head BETWEEN 'A1' AND 'DF')
ORDER BY head;
DROP TEMPORARY TABLE head, tail;
@@ -96,7 +96,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET cp932 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -388,138 +388,138 @@ code a
81F0 Å
Warnings:
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
Warnings:
Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AE to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81AF to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81B7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'cp932' character 0x81EA to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EB to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EC to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81ED to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EE to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81EF to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81F8 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81F9 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81FA to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x81FB to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8240 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8241 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8242 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8243 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8244 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8245 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8246 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8247 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8248 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8249 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824A to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824B to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824C to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824D to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x824E to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x8259 to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825A to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825B to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825C to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825D to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825E to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x825F to 'utf8'
+Warning 1977 Cannot convert 'cp932' character 0x827A to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test cp932->Unicode conversion
@@ -19762,7 +19762,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET cp932 NOT NULL
+ `a` varchar(5) CHARACTER SET cp932 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -20021,7 +20021,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET cp932 COLLATE cp932_bin NOT NULL
+ `a` varchar(5) CHARACTER SET cp932 COLLATE cp932_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -20300,7 +20300,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET cp932 NOT NULL
+ `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\'),('à\t');
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
@@ -20339,7 +20339,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET cp932 NOT NULL
+ `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
@@ -20378,7 +20378,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET cp932 NOT NULL
+ `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
@@ -20424,7 +20424,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET cp932 NOT NULL
+ `a` varchar(10) CHARACTER SET cp932 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
@@ -20444,7 +20444,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(10) NOT NULL
+ `a` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
diff --git a/mysql-test/r/ctype_eucjpms.result b/mysql-test/r/ctype_eucjpms.result
index b40787992bf..afca918abc1 100644
--- a/mysql-test/r/ctype_eucjpms.result
+++ b/mysql-test/r/ctype_eucjpms.result
@@ -9881,30 +9881,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET collation_connection='eucjpms_bin';
create table t1 select repeat('a',4000) a;
@@ -9988,39 +9976,27 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
select hex(convert(_eucjpms 0xA5FE41 using ucs2));
hex(convert(_eucjpms 0xA5FE41 using ucs2))
-003F0041
+NULL
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA5FE to 'ucs2'
select hex(convert(_eucjpms 0x8FABF841 using ucs2));
hex(convert(_eucjpms 0x8FABF841 using ucs2))
-003F0041
+NULL
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0x8FABF8 to 'ucs2'
set global LC_TIME_NAMES=convert((convert((0x63) using eucjpms)) using utf8);
@@ -10040,18 +10016,18 @@ CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1
CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2;
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0;
-INSERT INTO t1 (code) SELECT concat('8E', head) FROM head
+INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head
WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
-INSERT INTO t1 (code) SELECT concat(head, tail)
+INSERT IGNORE INTO t1 (code) SELECT concat(head, tail)
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F')
AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
-INSERT INTO t1 (code) SELECT concat('8F', head, tail)
+INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail)
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
@@ -10064,7 +10040,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(6) CHARACTER SET eucjpms NOT NULL,
`a` varchar(1) CHARACTER SET eucjpms NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -10590,69 +10566,69 @@ code a
8FAABC Ģ
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -10661,69 +10637,69 @@ code a
8FABB9 ǵ
Warnings:
Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'eucjpms' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2ED to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2F1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A1 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A2 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A3 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A4 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A5 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A6 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A7 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A8 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3A9 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3AF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BA to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BB to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BC to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BD to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BE to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3BF to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'eucjpms' character 0xA3DB to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -33013,7 +32989,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET eucjpms NOT NULL
+ `a` varchar(5) CHARACTER SET eucjpms DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -33446,7 +33422,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET eucjpms COLLATE eucjpms_bin NOT NULL
+ `a` varchar(5) CHARACTER SET eucjpms COLLATE eucjpms_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -33861,7 +33837,7 @@ hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0))
# MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET eucjpms);
-INSERT INTO t1 VALUES (0x8EA0);
+INSERT IGNORE INTO t1 VALUES (0x8EA0);
SELECT HEX(a), CHAR_LENGTH(a) FROM t1;
HEX(a) CHAR_LENGTH(a)
3F3F 2
@@ -33920,7 +33896,7 @@ DROP TABLE t1;
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET eucjpms);
-LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES;
+LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET eucjpms IGNORE 4 LINES;
SELECT HEX(a) FROM t1;
HEX(a)
3F
diff --git a/mysql-test/r/ctype_euckr.result b/mysql-test/r/ctype_euckr.result
index 359984d1e51..8069ef54bb1 100644
--- a/mysql-test/r/ctype_euckr.result
+++ b/mysql-test/r/ctype_euckr.result
@@ -55,7 +55,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -224,30 +224,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET collation_connection='euckr_bin';
create table t1 select repeat('a',4000) a;
@@ -371,30 +359,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET NAMES euckr;
CREATE TABLE t1 (a text) character set euckr;
@@ -411,22 +387,22 @@ insert into t1 values (0xA161);
insert into t1 values (0xA17A);
insert into t1 values (0xA181);
insert into t1 values (0xA1FE);
-insert into t1 values (0xA140);
+insert ignore into t1 values (0xA140);
Warnings:
Warning 1366 Incorrect string value: '\xA1@' for column 's1' at row 1
-insert into t1 values (0xA15B);
+insert ignore into t1 values (0xA15B);
Warnings:
Warning 1366 Incorrect string value: '\xA1[' for column 's1' at row 1
-insert into t1 values (0xA160);
+insert ignore into t1 values (0xA160);
Warnings:
Warning 1366 Incorrect string value: '\xA1`' for column 's1' at row 1
-insert into t1 values (0xA17B);
+insert ignore into t1 values (0xA17B);
Warnings:
Warning 1366 Incorrect string value: '\xA1{' for column 's1' at row 1
-insert into t1 values (0xA180);
+insert ignore into t1 values (0xA180);
Warnings:
Warning 1366 Incorrect string value: '\xA1\x80' for column 's1' at row 1
-insert into t1 values (0xA1FF);
+insert ignore into t1 values (0xA1FF);
Warnings:
Warning 1366 Incorrect string value: '\xA1\xFF' for column 's1' at row 1
select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
@@ -1985,7 +1961,7 @@ FE7F
FE80
DELETE FROM t2 WHERE a='?';
ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr;
-UPDATE t2 SET u=a, a2=u;
+UPDATE IGNORE t2 SET u=a, a2=u;
SELECT s as unassigned_code FROM t2 WHERE u='?';
unassigned_code
A2E8
@@ -24450,7 +24426,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET euckr NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -24738,69 +24714,69 @@ code a
A1CA Å
Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -24834,69 +24810,69 @@ A8E6 ⓩ
A9A2 đ
Warnings:
Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2E8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2E9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2ED to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F1 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F2 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F3 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F4 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F5 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F6 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F7 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F8 to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2F9 to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FA to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AB to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AC to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AE to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5AF to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BA to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BB to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BC to 'utf8'
-Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
Warning 1977 Cannot convert 'euckr' character 0xA5BD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5BF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5C0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5D9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5DF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5E0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5F9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FD to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA5FE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E5 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E6 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E7 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E8 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6E9 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EA to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EB to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EC to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6ED to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EE to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6EF to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F0 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F1 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F2 to 'utf8'
+Warning 1977 Cannot convert 'euckr' character 0xA6F3 to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
@@ -24935,7 +24911,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET euckr NOT NULL
+ `a` varchar(5) CHARACTER SET euckr DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -25194,7 +25170,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET euckr COLLATE euckr_bin NOT NULL
+ `a` varchar(5) CHARACTER SET euckr COLLATE euckr_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_gb2312.result b/mysql-test/r/ctype_gb2312.result
index 4702eac6b6b..cef286b0aab 100644
--- a/mysql-test/r/ctype_gb2312.result
+++ b/mysql-test/r/ctype_gb2312.result
@@ -55,7 +55,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -224,30 +224,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
@@ -452,30 +440,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET NAMES gb2312;
CREATE TABLE t1 (a text) character set gb2312;
@@ -511,7 +487,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET gb2312 NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -766,69 +742,69 @@ A2FB Ⅺ
A2FC Ⅻ
Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -861,69 +837,69 @@ A8B9 Ì
A8BA ê
Warnings:
Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A1 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A2 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A5 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A6 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A8 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2A9 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AA to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AB to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AC to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AD to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AE to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2E3 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2E4 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2EF to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2F0 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA2FE to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F4 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F5 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F6 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F7 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F8 to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4F9 to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FA to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FB to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FC to 'utf8'
-Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
Warning 1977 Cannot convert 'gb2312' character 0xA4FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA4FE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F7 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F8 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5F9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA5FE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6B9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6BF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6C0 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6D9 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DA to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DB to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DC to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DD to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DE to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6DF to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E0 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E1 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E2 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E3 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E4 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E5 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E6 to 'utf8'
+Warning 1977 Cannot convert 'gb2312' character 0xA6E7 to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
@@ -962,7 +938,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET gb2312 NOT NULL
+ `a` varchar(5) CHARACTER SET gb2312 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1221,7 +1197,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET gb2312 COLLATE gb2312_bin NOT NULL
+ `a` varchar(5) CHARACTER SET gb2312 COLLATE gb2312_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1459,6 +1435,7 @@ A1A1A1A1A1A120202020202020202020202020202020202020
# Start of 10.0 tests
#
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -4521,6 +4498,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
#
# End of 10.0 tests
diff --git a/mysql-test/r/ctype_gbk.result b/mysql-test/r/ctype_gbk.result
index 34c3f6c7486..b98140bc228 100644
--- a/mysql-test/r/ctype_gbk.result
+++ b/mysql-test/r/ctype_gbk.result
@@ -55,7 +55,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -224,30 +224,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
drop table if exists t1;
create table t1 select repeat('a',10) as c1;
@@ -452,30 +440,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET NAMES gbk;
CREATE TABLE t1 (a text) character set gbk;
@@ -485,11 +461,13 @@ hex(a)
A1A1
A3A0
DROP TABLE t1;
+set sql_mode = '';
select hex(convert(_gbk 0xA14041 using ucs2));
hex(convert(_gbk 0xA14041 using ucs2))
003F0041
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'ucs2'
+set sql_mode = default;
create table t1 (c1 text not null, c2 text not null) character set gbk;
alter table t1 change c1 c1 mediumtext character set gbk not null;
show create table t1;
@@ -533,7 +511,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET gbk NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -798,69 +776,69 @@ A2FB Ⅺ
A2FC Ⅻ
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -895,69 +873,69 @@ A8BD ń
A8BE ň
Warnings:
Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA140 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA141 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA142 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA143 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA144 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA145 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA146 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA147 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA148 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA149 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14A to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14C to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14D to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14E to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA14F to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA150 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA151 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA152 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA153 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA154 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA155 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA156 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA157 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA158 to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA159 to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15A to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15B to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15C to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15D to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15E to 'utf8'
-Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
Warning 1977 Cannot convert 'gbk' character 0xA15F to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA160 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA161 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA162 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA163 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA164 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA165 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA166 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA167 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA168 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA169 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16B to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16D to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA16F to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA170 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA171 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA172 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA173 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA174 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA175 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA176 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA177 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA178 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA179 to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17A to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17B to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17C to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17D to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA17E to 'utf8'
+Warning 1977 Cannot convert 'gbk' character 0xA180 to 'utf8'
DROP TABLE t1;
#
# End of 5.5 tests
@@ -996,7 +974,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET gbk NOT NULL
+ `a` varchar(5) CHARACTER SET gbk DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1429,7 +1407,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET gbk COLLATE gbk_bin NOT NULL
+ `a` varchar(5) CHARACTER SET gbk COLLATE gbk_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1841,6 +1819,7 @@ hex(weight_string(cast(0x8EA18EA18EA1 as char),25, 4, 0xC0))
# Start of 10.0 tests
#
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -4903,6 +4882,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
SET NAMES gbk;
# Start of ctype_E05C.inc
@@ -4946,7 +4926,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET gbk NOT NULL
+ `a` varchar(10) CHARACTER SET gbk DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\'),('à\t');
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
@@ -4985,7 +4965,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET gbk NOT NULL
+ `a` varchar(10) CHARACTER SET gbk DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
@@ -5024,7 +5004,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET gbk NOT NULL
+ `a` varchar(10) CHARACTER SET gbk DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
@@ -5070,7 +5050,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET gbk NOT NULL
+ `a` varchar(10) CHARACTER SET gbk DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
@@ -5090,7 +5070,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(10) NOT NULL
+ `a` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
@@ -5169,7 +5149,7 @@ DELETE FROM t3;
# Sequences that start with a tail or a bad byte,
# or end with a bad byte, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE type1='tail' OR type1='bad' OR type2='bad'
ORDER BY b;
Warnings:
@@ -5224,7 +5204,7 @@ DELETE FROM t3;
# Sequences that start with an ASCII or an MB2 character,
# followed by a non-ASCII tail, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1))
AND (FIND_IN_SET('tail',type2) AND NOT FIND_IN_SET('ascii',type2))
ORDER BY b;
@@ -5378,7 +5358,7 @@ DELETE FROM t3;
# Sequences that start with a tail or a bad byte,
# or have a bad byte, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE type1='tail' OR type1='bad' OR type2='bad' OR type3='bad'
ORDER BY b;
Warnings:
@@ -5622,7 +5602,7 @@ DELETE FROM t3;
# Sequences that start with an ASCII or an MB2 character,
# followed by a pure non-ASCII tail, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1))
AND type2='tail'
ORDER BY b;
@@ -5688,7 +5668,7 @@ DELETE FROM t3;
# Sequences that consist of two ASCII or MB2 characters,
# followed by a pure non-ASCII tail, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE (FIND_IN_SET('mb2',type1) OR FIND_IN_SET('ascii',type1)) AND
(FIND_IN_SET('mb2',type2) OR FIND_IN_SET('ascii',type2)) AND
type3='tail'
@@ -5739,7 +5719,7 @@ DELETE FROM t3;
# Sequences that consist of two MB2 characters,
# followed by a non-ASCII head or tail, all should be fixed.
#
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2
WHERE FIND_IN_SET('mb2',type1) AND FIND_IN_SET('mb2',type2)
AND NOT FIND_IN_SET('ascii',type3)
AND NOT FIND_IN_SET('mb2',type3)
@@ -5827,7 +5807,7 @@ SELECT HEX(c),HEX(b),comment FROM t3 WHERE b<>c ORDER BY b;
HEX(c) HEX(b) comment
DELETE FROM t2 WHERE b IN (SELECT b FROM t3);
DELETE FROM t3;
-INSERT INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b;
+INSERT IGNORE INTO t3 (b,c,comment) SELECT b,b,comment FROM t2 ORDER BY b;
Warnings:
Warning 1366 Incorrect string value: '\x81' for column 'c' at row 1
Warning 1366 Incorrect string value: '\xA3' for column 'c' at row 3
@@ -5913,6 +5893,7 @@ DROP TABLE t1;
#
# MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
#
+set sql_mode='';
SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312))
3F41
@@ -5923,6 +5904,7 @@ HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8))
3F41
Warnings:
Warning 1300 Invalid gb2312 character string: '\xA3A'
+set sql_mode=default;
#
# End of 10.1 tests
#
diff --git a/mysql-test/r/ctype_latin1.result b/mysql-test/r/ctype_latin1.result
index 80e5358d2df..e7f49989c04 100644
--- a/mysql-test/r/ctype_latin1.result
+++ b/mysql-test/r/ctype_latin1.result
@@ -364,7 +364,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -518,8 +518,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
-subject varchar(64) NO NULL
-pattern varchar(64) NO NULL
+subject varchar(64) YES NULL
+pattern varchar(64) YES NULL
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
@@ -719,7 +719,7 @@ create table t1 as select concat(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -732,7 +732,7 @@ create table t1 as select concat(18446744073709551615) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(20) NOT NULL
+ `c1` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -745,7 +745,7 @@ create table t1 as select concat(1.1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -758,7 +758,7 @@ create table t1 as select concat(1+2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1-2));
@@ -768,7 +768,7 @@ create table t1 as select concat(1-2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1*2));
@@ -778,7 +778,7 @@ create table t1 as select concat(1*2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1/2));
@@ -818,7 +818,7 @@ create table t1 as select concat(-1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-(1+2)));
@@ -828,7 +828,7 @@ create table t1 as select concat(-(1+2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1|2));
@@ -838,7 +838,7 @@ create table t1 as select concat(1|2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1&2));
@@ -848,7 +848,7 @@ create table t1 as select concat(1&2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_count(12)));
@@ -858,7 +858,7 @@ create table t1 as select concat(bit_count(12)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2<<1));
@@ -868,7 +868,7 @@ create table t1 as select concat(2<<1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2>>1));
@@ -878,7 +878,7 @@ create table t1 as select concat(2>>1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(~0));
@@ -888,7 +888,7 @@ create table t1 as select concat(~0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(3^2));
@@ -898,7 +898,7 @@ create table t1 as select concat(3^2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(abs(-2)));
@@ -908,7 +908,7 @@ create table t1 as select concat(abs(-2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(concat(exp(2)),1));
@@ -1038,7 +1038,7 @@ create table t1 as select concat(degrees(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) NOT NULL
+ `c1` varchar(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(radians(0)));
@@ -1048,7 +1048,7 @@ create table t1 as select concat(radians(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) NOT NULL
+ `c1` varchar(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ceiling(0.5)));
@@ -1058,7 +1058,7 @@ create table t1 as select concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
@@ -1068,7 +1068,7 @@ create table t1 as select concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -1078,7 +1078,7 @@ create table t1 as select concat(round(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sign(0.5)));
@@ -1088,14 +1088,14 @@ create table t1 as select concat(sign(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(rand()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) NOT NULL
+ `c1` varchar(23) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(length('a')));
@@ -1105,7 +1105,7 @@ create table t1 as select concat(length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(char_length('a')));
@@ -1115,7 +1115,7 @@ create table t1 as select concat(char_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_length('a')));
@@ -1125,7 +1125,7 @@ create table t1 as select concat(bit_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coercibility('a')));
@@ -1135,7 +1135,7 @@ create table t1 as select concat(coercibility('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(locate('a','a')));
@@ -1145,7 +1145,7 @@ create table t1 as select concat(locate('a','a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(11) NOT NULL
+ `c1` varchar(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(field('c','a','b','c')));
@@ -1155,7 +1155,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ascii(61)));
@@ -1165,7 +1165,7 @@ create table t1 as select concat(ascii(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ord(61)));
@@ -1175,7 +1175,7 @@ create table t1 as select concat(ord(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(find_in_set('b','a,b,c,d')));
@@ -1185,7 +1185,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select md5('a'), hex(md5('a'));
@@ -1195,7 +1195,7 @@ create table t1 as select md5('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(32) NOT NULL
+ `c1` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select old_password('a'), hex(old_password('a'));
@@ -1205,7 +1205,7 @@ create table t1 as select old_password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(16) NOT NULL
+ `c1` varchar(16) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select password('a'), hex(password('a'));
@@ -1215,7 +1215,7 @@ create table t1 as select password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(41) NOT NULL
+ `c1` varchar(41) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha('a'), hex(sha('a'));
@@ -1225,7 +1225,7 @@ create table t1 as select sha('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) NOT NULL
+ `c1` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha1('a'), hex(sha1('a'));
@@ -1235,7 +1235,7 @@ create table t1 as select sha1('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) NOT NULL
+ `c1` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('-1' as signed)));
@@ -1245,7 +1245,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('1' as unsigned)));
@@ -1255,7 +1255,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast(1/2 as decimal(5,5))));
@@ -1314,7 +1314,7 @@ create table t1 as select concat(least(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(greatest(1,2)));
@@ -1324,7 +1324,7 @@ create table t1 as select concat(greatest(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(case when 11 then 22 else 33 end));
@@ -1334,7 +1334,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coalesce(1,2)));
@@ -1344,7 +1344,7 @@ create table t1 as select concat(coalesce(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat_ws(1,2,3));
@@ -1354,7 +1354,7 @@ create table t1 as select concat_ws(1,2,3) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(group_concat(1,2,3));
@@ -1382,7 +1382,7 @@ create table t1 as select concat(last_insert_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(benchmark(0,0)));
@@ -1392,7 +1392,7 @@ create table t1 as select concat(benchmark(0,0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sleep(0)));
@@ -1402,7 +1402,7 @@ create table t1 as select concat(sleep(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(is_free_lock('xxxx')));
@@ -1436,7 +1436,7 @@ create table t1 as select concat(crc32('')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(uncompressed_length('')));
@@ -1453,7 +1453,7 @@ create table t1 as select concat(connection_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(inet_aton('127.1.1.1')));
@@ -1489,7 +1489,7 @@ create table t1 as select concat(row_count()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(found_rows()));
@@ -1499,21 +1499,21 @@ create table t1 as select concat(found_rows()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid_short()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) NOT NULL
+ `c1` varchar(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
@@ -1526,7 +1526,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(37) NOT NULL
+ `c1` varchar(37) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1;
@@ -1546,7 +1546,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL,
+ `c1` varchar(1) DEFAULT NULL,
`c2` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -1604,7 +1604,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL,
+ `c1` varchar(4) DEFAULT NULL,
`c2` decimal(2,1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -1643,7 +1643,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a'='a' IS NOT TRUE));
@@ -1653,7 +1653,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(NOT 'a'='a'));
@@ -1663,7 +1663,7 @@ create table t1 as select concat(NOT 'a'='a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NULL));
@@ -1673,7 +1673,7 @@ create table t1 as select concat('a' IS NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NOT NULL));
@@ -1683,7 +1683,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' rlike 'a'));
@@ -1693,7 +1693,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(strcmp('a','b')));
@@ -1703,7 +1703,7 @@ create table t1 as select concat(strcmp('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' like 'a'));
@@ -1713,7 +1713,7 @@ create table t1 as select concat('a' like 'b') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' between 'b' and 'c'));
@@ -1723,7 +1723,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' in ('a','b')));
@@ -1733,7 +1733,7 @@ create table t1 as select concat('a' in ('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(interval(23, 1, 15, 17, 30, 44, 200)));
@@ -1743,7 +1743,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a varchar(10), fulltext key(a));
@@ -1775,7 +1775,7 @@ create table t1 as select concat(ifnull(1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ifnull(1.1,1.1)));
@@ -1785,7 +1785,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(if(1,'b',1));
@@ -1815,7 +1815,7 @@ create table t1 as select concat(if(1,1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(nullif(1,2)));
@@ -1980,15 +1980,17 @@ create table t1 as select concat(period_add(200902, 2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) NOT NULL
+ `c1` varchar(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(period_diff(200902, 200802)));
hex(concat(period_diff(200902, 200802)))
3132
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as select concat(period_add(200902, 200802)) as c1;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2189,21 +2191,21 @@ create table t1 as select concat(curdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_date()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(curtime()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat('a',20) as c1 limit 0;
@@ -2219,7 +2221,7 @@ create table t1 as select concat(utc_time()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sec_to_time(2378)));
@@ -2312,21 +2314,21 @@ create table t1 as select concat(now()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) NOT NULL
+ `c1` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_timestamp()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) NOT NULL
+ `c1` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(sysdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) NOT NULL
+ `c1` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(addtime('00:00:00','11:22:33')));
@@ -2366,7 +2368,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(127) NOT NULL
+ `c1` varchar(127) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(insert(1133,3,0,22));
@@ -2376,7 +2378,7 @@ create table t1 as select insert(1133,3,0,22) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) NOT NULL
+ `c1` varchar(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lcase(123));
@@ -2386,7 +2388,7 @@ create table t1 as select lcase(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(123,1));
@@ -2396,7 +2398,7 @@ create table t1 as select left(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lower(123));
@@ -2406,7 +2408,7 @@ create table t1 as select lower(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) NOT NULL
+ `c1` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lpad(1,2,0));
@@ -2416,7 +2418,7 @@ create table t1 as select lpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ltrim(1));
@@ -2426,7 +2428,7 @@ create table t1 as select ltrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(mid(1,1,1));
@@ -2436,7 +2438,7 @@ create table t1 as select mid(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(repeat(1,2));
@@ -2446,7 +2448,7 @@ create table t1 as select repeat(1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(replace(1,1,2));
@@ -2456,7 +2458,7 @@ create table t1 as select replace(1,1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(reverse(12));
@@ -2466,7 +2468,7 @@ create table t1 as select reverse(12) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(right(123,1));
@@ -2476,7 +2478,7 @@ create table t1 as select right(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rpad(1,2,0));
@@ -2486,7 +2488,7 @@ create table t1 as select rpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) NOT NULL
+ `c1` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rtrim(1));
@@ -2496,7 +2498,7 @@ create table t1 as select rtrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(soundex(1));
@@ -2506,7 +2508,7 @@ create table t1 as select soundex(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) NOT NULL
+ `c1` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(substring(1,1,1));
@@ -2516,7 +2518,7 @@ create table t1 as select substring(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(trim(1));
@@ -2526,7 +2528,7 @@ create table t1 as select trim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ucase(1));
@@ -2536,7 +2538,7 @@ create table t1 as select ucase(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(upper(1));
@@ -2546,14 +2548,14 @@ create table t1 as select upper(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) NOT NULL
+ `c1` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat(' ', 64) as a limit 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) NOT NULL
+ `a` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ("1.1"), ("2.1");
select a, hex(a) from t1;
@@ -2783,7 +2785,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -2803,7 +2807,7 @@ create table t2 as select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `concat(a)` varchar(19) NOT NULL
+ `concat(a)` varchar(19) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a date);
@@ -3095,14 +3099,16 @@ hex(a)
drop table t1;
drop view v1;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
create view v1(a) as select concat(a) from t1;
show columns from v1;
Field Type Null Key Default Extra
-a varchar(19) NO
+a varchar(19) YES NULL
select hex(a) from v1;
hex(a)
303030302D30302D30302030303A30303A3030
@@ -3353,14 +3359,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `CONCAT_WS(1,2,3)` varchar(3) NOT NULL
+ `CONCAT_WS(1,2,3)` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `INSERT(1133,3,0,22)` varchar(6) NOT NULL
+ `INSERT(1133,3,0,22)` varchar(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LCASE(a) FROM t1;
@@ -3381,35 +3387,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPEAT(1,2)` varchar(2) NOT NULL
+ `REPEAT(1,2)` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LEFT(123,2)` varchar(2) NOT NULL
+ `LEFT(123,2)` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RIGHT(123,2)` varchar(2) NOT NULL
+ `RIGHT(123,2)` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LTRIM(123)` varchar(3) NOT NULL
+ `LTRIM(123)` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RTRIM(123)` varchar(3) NOT NULL
+ `RTRIM(123)` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1;
@@ -3423,35 +3429,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPLACE(111,2,3)` varchar(3) NOT NULL
+ `REPLACE(111,2,3)` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SUBSTRING_INDEX(111,111,1)` varchar(3) NOT NULL
+ `SUBSTRING_INDEX(111,111,1)` varchar(3) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `MAKE_SET(111,222,3)` varchar(5) NOT NULL
+ `MAKE_SET(111,222,3)` varchar(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SOUNDEX(1)` varchar(4) NOT NULL
+ `SOUNDEX(1)` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `EXPORT_SET(1,'Y','N','',8)` varchar(64) NOT NULL
+ `EXPORT_SET(1,'Y','N','',8)` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -3679,7 +3685,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) NOT NULL
+ `a` varchar(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3923,7 +3929,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -4167,7 +4173,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL
+ `a` varchar(5) CHARACTER SET latin1 COLLATE latin1_general_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -4411,7 +4417,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(5) NOT NULL
+ `a` varbinary(5) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -4635,6 +4641,7 @@ set names latin1;
# Start of 10.0 tests
#
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -7697,6 +7704,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
SET NAMES latin1;
#
@@ -7706,7 +7714,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -7729,7 +7737,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -7752,7 +7760,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -7775,7 +7783,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) NOT NULL
+ `c1` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -7801,7 +7809,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) NOT NULL
+ `a` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -7827,7 +7835,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -7850,7 +7858,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -7873,7 +7881,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -7896,7 +7904,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -7922,7 +7930,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL
+ `a` varchar(10) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -7982,7 +7990,7 @@ HEX(CONVERT('Âx' USING latin1))
3F78
SET NAMES utf8;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
-INSERT INTO t1 VALUES ('Â'),('Â#');
+INSERT IGNORE INTO t1 VALUES ('Â'),('Â#');
Warnings:
Warning 1366 Incorrect string value: '\xC2' for column 'a' at row 1
Warning 1366 Incorrect string value: '\xC2#' for column 'a' at row 2
diff --git a/mysql-test/r/ctype_latin1_de.result b/mysql-test/r/ctype_latin1_de.result
index d34d132e3a9..2d3803fba18 100644
--- a/mysql-test/r/ctype_latin1_de.result
+++ b/mysql-test/r/ctype_latin1_de.result
@@ -490,7 +490,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) COLLATE latin1_german2_ci NOT NULL,
+ `a` varchar(1) COLLATE latin1_german2_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -565,7 +565,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) COLLATE latin1_german2_ci NOT NULL
+ `a` varchar(5) COLLATE latin1_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german2_ci
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_latin2.result b/mysql-test/r/ctype_latin2.result
index 634640cab1d..d8fd22b5322 100644
--- a/mysql-test/r/ctype_latin2.result
+++ b/mysql-test/r/ctype_latin2.result
@@ -416,7 +416,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET latin2 NOT NULL
+ `a` varchar(5) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -626,7 +626,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET latin2 NOT NULL
+ `a` varchar(64) CHARACTER SET latin2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('');
SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1;
@@ -697,7 +697,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_bin NOT NULL
+ `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_latin2_ch.result b/mysql-test/r/ctype_latin2_ch.result
index e559689fdd0..87357a49197 100644
--- a/mysql-test/r/ctype_latin2_ch.result
+++ b/mysql-test/r/ctype_latin2_ch.result
@@ -52,7 +52,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -75,7 +75,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -98,7 +98,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -121,7 +121,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `c1` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -147,7 +147,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `a` varchar(10) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -530,7 +530,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_czech_cs NOT NULL
+ `a` varchar(5) CHARACTER SET latin2 COLLATE latin2_czech_cs DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_ldml.result b/mysql-test/r/ctype_ldml.result
index 237646ade77..479e0e834e2 100644
--- a/mysql-test/r/ctype_ldml.result
+++ b/mysql-test/r/ctype_ldml.result
@@ -165,9 +165,11 @@ DROP TABLE t1;
# Bug#43827 Server closes connections and restarts
#
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
+SET sql_mode='';
INSERT INTO t1 SELECT REPEAT('a',11);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+SET sql_mode=default;
DROP TABLE t1;
Vietnamese experimental collation
show collation like 'ucs2_vn_ci';
diff --git a/mysql-test/r/ctype_many.result b/mysql-test/r/ctype_many.result
index 59443a3a2d5..1a79e44daa8 100644
--- a/mysql-test/r/ctype_many.result
+++ b/mysql-test/r/ctype_many.result
@@ -1302,7 +1302,9 @@ CYR SMALL YA CYR CAPIT YA
CYR SMALL YA CYR SMALL YA
SET CHARACTER SET utf8;
ALTER TABLE t1 ADD ucs2_f CHAR(32) CHARACTER SET ucs2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE ucs2_f ucs2_f CHAR(32) UNICODE NOT NULL;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0391,'GREEK CAPIT ALPHA');
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0392,'GREEK CAPIT BETA');
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0393,'GREEK CAPIT GAMMA');
@@ -1764,7 +1766,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf32);
CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET ucs2);
INSERT INTO t1 VALUES (0x10082), (0x12345);
-INSERT INTO t2 SELECT * FROM t1;
+INSERT IGNORE INTO t2 SELECT * FROM t1;
Warnings:
Warning 1366 Incorrect string value: '\x00\x01\x00\x82' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x00\x01\x23\x45' for column 'a' at row 2
diff --git a/mysql-test/r/ctype_mb.result b/mysql-test/r/ctype_mb.result
index b6e93bae65a..015457cc1b3 100644
--- a/mysql-test/r/ctype_mb.result
+++ b/mysql-test/r/ctype_mb.result
@@ -15,7 +15,7 @@ t1 CREATE TABLE `t1` (
`c2` varchar(4) CHARACTER SET utf8 NOT NULL,
`c3` char(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
+INSERT IGNORE INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
Warning 1265 Data truncated for column 'c2' at row 1
diff --git a/mysql-test/r/ctype_recoding.result b/mysql-test/r/ctype_recoding.result
index 93f1639e88d..806d9dc6997 100644
--- a/mysql-test/r/ctype_recoding.result
+++ b/mysql-test/r/ctype_recoding.result
@@ -169,7 +169,7 @@ ERROR HY000: Invalid utf8 character string: 'good\xD0\xCC\xCF\xC8\xCF'
set names latin1;
create table t1 (a char(10) character set koi8r, b text character set koi8r);
insert into t1 values ('test','test');
-insert into t1 values ('ÊÃÕË','ÊÃÕË');
+insert ignore into t1 values ('ÊÃÕË','ÊÃÕË');
Warnings:
Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'a' at row 1
Warning 1366 Incorrect string value: '\xCA\xC3\xD5\xCB' for column 'b' at row 1
diff --git a/mysql-test/r/ctype_sjis.result b/mysql-test/r/ctype_sjis.result
index 50938fada63..756e7a11d93 100644
--- a/mysql-test/r/ctype_sjis.result
+++ b/mysql-test/r/ctype_sjis.result
@@ -193,30 +193,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
#
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
@@ -230,8 +218,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
-subject varchar(64) NO NULL
-pattern varchar(64) NO NULL
+subject varchar(64) YES NULL
+pattern varchar(64) YES NULL
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
@@ -359,30 +347,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET NAMES sjis;
SELECT HEX('²“‘@Œ\') FROM DUAL;
@@ -424,7 +400,7 @@ FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN 'A1' AND 'DF')
AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
-INSERT t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF');
+INSERT IGNORE t1 (code) SELECT head FROM head WHERE (head BETWEEN 'A1' AND 'DF');
Warnings:
Warning 1364 Field 'a' doesn't have a default value
DROP TEMPORARY TABLE head, tail;
@@ -434,7 +410,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(8) DEFAULT NULL,
`a` varchar(1) CHARACTER SET sjis NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -687,138 +663,138 @@ code a
81F0 Å
Warnings:
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
code a
Warnings:
Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AD to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AE to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81AF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81B7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C4 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C5 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C6 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81C7 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81CF to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D0 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D1 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D2 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D3 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D4 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D5 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D6 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D7 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D8 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81D9 to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81E9 to 'utf8'
-Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
Warning 1977 Cannot convert 'sjis' character 0x81EA to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EB to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EC to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81ED to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EE to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81EF to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81F8 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81F9 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81FA to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x81FB to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8240 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8241 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8242 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8243 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8244 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8245 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8246 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8247 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8248 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8249 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824A to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824B to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824C to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824D to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x824E to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x8259 to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825A to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825B to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825C to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825D to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825E to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x825F to 'utf8'
+Warning 1977 Cannot convert 'sjis' character 0x827A to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -14972,7 +14948,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET sjis NOT NULL
+ `a` varchar(5) CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -15231,7 +15207,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET sjis COLLATE sjis_bin NOT NULL
+ `a` varchar(5) CHARACTER SET sjis COLLATE sjis_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -15469,6 +15445,7 @@ hex(weight_string(cast(0x814081408140 as char),25, 4, 0xC0))
# Start of 10.0 tests
#
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -18531,6 +18508,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
SET NAMES sjis;
# Start of ctype_E05C.inc
@@ -18574,7 +18552,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ',10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET sjis NOT NULL
+ `a` varchar(10) CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\'),('à\t');
INSERT INTO t1 VALUES ('\\à\'),('\\à\t'),('\\à\t\t');
@@ -18613,7 +18591,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET sjis NOT NULL
+ `a` varchar(10) CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (BINARY('à\')),(BINARY('à\t'));
INSERT INTO t1 VALUES (BINARY('\\à\')),(BINARY('\\à\t')),(BINARY('\\à\t\t'));
@@ -18652,7 +18630,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET sjis NOT NULL
+ `a` varchar(10) CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_BINARY'à\'),(_BINARY'à\t');
INSERT INTO t1 VALUES (_BINARY'\\à\'),(_BINARY'\\à\t'),(_BINARY'\\à\t\t');
@@ -18698,7 +18676,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET sjis NOT NULL
+ `a` varchar(10) CHARACTER SET sjis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
@@ -18718,7 +18696,7 @@ CREATE TABLE t1 AS SELECT REPEAT(' ', 10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varbinary(10) NOT NULL
+ `a` varbinary(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('à\['),('\à\[');
SELECT HEX(a) FROM t1;
diff --git a/mysql-test/r/ctype_swe7.result b/mysql-test/r/ctype_swe7.result
index 8aeb05eaa3b..63da7d362ca 100644
--- a/mysql-test/r/ctype_swe7.result
+++ b/mysql-test/r/ctype_swe7.result
@@ -3,6 +3,7 @@
#
SET NAMES swe7;
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -3065,6 +3066,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
#
# End of 10.0 tests
diff --git a/mysql-test/r/ctype_tis620.result b/mysql-test/r/ctype_tis620.result
index 3dbccf9ccb0..f38759be961 100644
--- a/mysql-test/r/ctype_tis620.result
+++ b/mysql-test/r/ctype_tis620.result
@@ -2899,6 +2899,7 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
6109 -1 -1
61 0 0
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(11) NOT NULL auto_increment,
`url` varchar(200) NOT NULL default '',
@@ -2917,6 +2918,7 @@ CREATE TABLE t1 (
PRIMARY KEY (`id`),
UNIQUE KEY `url` (`url`)
) CHARACTER SET tis620;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(1,'http://www.siamzone.com/download/download/000001-frodo_1024.jpg','The Lord
of the Rings
@@ -3122,7 +3124,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -3145,7 +3147,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -3168,7 +3170,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -3191,7 +3193,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -3217,7 +3219,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET tis620 NOT NULL
+ `a` varchar(10) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -3338,7 +3340,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -3361,7 +3363,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -3384,7 +3386,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -3407,7 +3409,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -3433,7 +3435,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `a` varchar(10) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -3486,7 +3488,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET tis620 NOT NULL
+ `a` varchar(5) CHARACTER SET tis620 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3679,7 +3681,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET tis620 COLLATE tis620_bin NOT NULL
+ `a` varchar(5) CHARACTER SET tis620 COLLATE tis620_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_uca.result b/mysql-test/r/ctype_uca.result
index 3d93d7f201e..6c6dceba9cb 100644
--- a/mysql-test/r/ctype_uca.result
+++ b/mysql-test/r/ctype_uca.result
@@ -6080,7 +6080,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -6326,7 +6326,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -6520,30 +6520,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
set names utf8;
End for 5.0 tests
@@ -6746,7 +6734,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -6834,7 +6822,7 @@ aր
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
@@ -6861,7 +6849,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
@@ -6894,7 +6882,7 @@ z
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
@@ -6905,7 +6893,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
@@ -6990,7 +6978,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -7245,7 +7233,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci NOT NULL
+ `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -7489,7 +7477,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -8117,7 +8105,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -8147,7 +8135,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL
+ `c` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A);
INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C);
@@ -8420,7 +8408,7 @@ F09090A8 30D2 𐐚
ALTER TABLE t1 ADD KEY(c);
EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 42 NULL 3 Using where; Using index
+1 SIMPLE t1 range c c 43 NULL 3 Using where; Using index
SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
hex(c) hex(weight_string(c))
61 120F
@@ -8451,7 +8439,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -8474,7 +8462,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -8497,7 +8485,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -8520,7 +8508,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -8546,7 +8534,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -8571,7 +8559,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('À');
SELECT * FROM t1 WHERE c1='À';
@@ -8609,7 +8597,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -8632,7 +8620,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -8655,7 +8643,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -8678,7 +8666,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -8704,7 +8692,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -8729,7 +8717,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_german2_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('À');
SELECT * FROM t1 WHERE c1='À';
@@ -8782,7 +8770,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `s1` varchar(64) CHARACTER SET utf8 COLLATE utf8_myanmar_ci NOT NULL,
+ `s1` varchar(64) CHARACTER SET utf8 COLLATE utf8_myanmar_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (s1) VALUES
@@ -11358,7 +11346,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_myanmar_ci NOT NULL,
+ `s1` varchar(64) CHARACTER SET ucs2 COLLATE ucs2_myanmar_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (s1) VALUES
@@ -13998,7 +13986,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(3) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL
+ `a` varchar(3) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2));
SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1;
@@ -14031,7 +14019,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_ucs2 0x3400);
INSERT INTO t1 VALUES (_ucs2 0xF001);
@@ -14044,7 +14032,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a;
@@ -14103,7 +14091,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('cota'),('cote'),('cotz');
INSERT INTO t1 VALUES ('coté'),('cÎte'),('cÎté'),('cotë'),('cÎtë');
@@ -14692,7 +14680,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(3) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL
+ `a` varchar(3) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2));
SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1;
@@ -14725,7 +14713,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_ucs2 0x3400);
INSERT INTO t1 VALUES (_ucs2 0xF001);
@@ -14738,7 +14726,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a;
@@ -14797,7 +14785,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('cota'),('cote'),('cotz');
INSERT INTO t1 VALUES ('coté'),('cÎte'),('cÎté'),('cotë'),('cÎtë');
diff --git a/mysql-test/r/ctype_uca_innodb.result b/mysql-test/r/ctype_uca_innodb.result
index f189e698da1..c04a99c8cd3 100644
--- a/mysql-test/r/ctype_uca_innodb.result
+++ b/mysql-test/r/ctype_uca_innodb.result
@@ -15,7 +15,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -103,7 +103,7 @@ aր
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
@@ -130,7 +130,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
@@ -163,7 +163,7 @@ z
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
@@ -174,7 +174,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
diff --git a/mysql-test/r/ctype_ucs.result b/mysql-test/r/ctype_ucs.result
index 9c5a33f23e5..eda565ec85d 100644
--- a/mysql-test/r/ctype_ucs.result
+++ b/mysql-test/r/ctype_ucs.result
@@ -55,7 +55,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -196,8 +196,8 @@ RPAD(_ucs2 X'0420',10,_ucs2 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `l` varchar(10) CHARACTER SET ucs2 NOT NULL,
- `r` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `l` varchar(10) CHARACTER SET ucs2 DEFAULT NULL,
+ `r` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
#
@@ -933,7 +933,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET ucs2 NOT NULL,
+ `a` varchar(1) CHARACTER SET ucs2 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -959,30 +959,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
#
# MDEV-4842 STR_TO_DATE does not work with UCS2/UTF16/UTF32
@@ -996,8 +984,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
-subject varchar(64) NO NULL
-pattern varchar(64) NO NULL
+subject varchar(64) YES NULL
+pattern varchar(64) YES NULL
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
@@ -1104,30 +1092,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F20025
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
select hex(substr(_ucs2 0x00e400e50068,1));
hex(substr(_ucs2 0x00e400e50068,1))
@@ -1156,7 +1132,7 @@ Field1
-1
DROP TABLE t1;
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
-INSERT INTO t1 VALUES ('-1');
+INSERT IGNORE INTO t1 VALUES ('-1');
Warnings:
Warning 1264 Out of range value for column 'Field1' at row 1
DROP TABLE t1;
@@ -1622,7 +1598,7 @@ create table t1 as select concat(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -1635,7 +1611,7 @@ create table t1 as select concat(18446744073709551615) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(20) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(20) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -1648,7 +1624,7 @@ create table t1 as select concat(1.1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -1661,7 +1637,7 @@ create table t1 as select concat(1+2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1-2));
@@ -1671,7 +1647,7 @@ create table t1 as select concat(1-2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1*2));
@@ -1681,7 +1657,7 @@ create table t1 as select concat(1*2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1/2));
@@ -1721,7 +1697,7 @@ create table t1 as select concat(-1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-(1+2)));
@@ -1731,7 +1707,7 @@ create table t1 as select concat(-(1+2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1|2));
@@ -1741,7 +1717,7 @@ create table t1 as select concat(1|2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1&2));
@@ -1751,7 +1727,7 @@ create table t1 as select concat(1&2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_count(12)));
@@ -1761,7 +1737,7 @@ create table t1 as select concat(bit_count(12)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2<<1));
@@ -1771,7 +1747,7 @@ create table t1 as select concat(2<<1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2>>1));
@@ -1781,7 +1757,7 @@ create table t1 as select concat(2>>1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(~0));
@@ -1791,7 +1767,7 @@ create table t1 as select concat(~0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(3^2));
@@ -1801,7 +1777,7 @@ create table t1 as select concat(3^2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(abs(-2)));
@@ -1811,7 +1787,7 @@ create table t1 as select concat(abs(-2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(concat(exp(2)),1));
@@ -1941,7 +1917,7 @@ create table t1 as select concat(degrees(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(radians(0)));
@@ -1951,7 +1927,7 @@ create table t1 as select concat(radians(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ceiling(0.5)));
@@ -1961,7 +1937,7 @@ create table t1 as select concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
@@ -1971,7 +1947,7 @@ create table t1 as select concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -1981,7 +1957,7 @@ create table t1 as select concat(round(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sign(0.5)));
@@ -1991,14 +1967,14 @@ create table t1 as select concat(sign(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(rand()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(23) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(length('a')));
@@ -2008,7 +1984,7 @@ create table t1 as select concat(length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(char_length('a')));
@@ -2018,7 +1994,7 @@ create table t1 as select concat(char_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_length('a')));
@@ -2028,7 +2004,7 @@ create table t1 as select concat(bit_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coercibility('a')));
@@ -2038,7 +2014,7 @@ create table t1 as select concat(coercibility('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(locate('a','a')));
@@ -2048,7 +2024,7 @@ create table t1 as select concat(locate('a','a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(11) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(11) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(field('c','a','b','c')));
@@ -2058,7 +2034,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ascii(61)));
@@ -2068,7 +2044,7 @@ create table t1 as select concat(ascii(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ord(61)));
@@ -2078,7 +2054,7 @@ create table t1 as select concat(ord(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(find_in_set('b','a,b,c,d')));
@@ -2088,7 +2064,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select md5('a'), hex(md5('a'));
@@ -2098,7 +2074,7 @@ create table t1 as select md5('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(32) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(32) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select old_password('a'), hex(old_password('a'));
@@ -2108,7 +2084,7 @@ create table t1 as select old_password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(16) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(16) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select password('a'), hex(password('a'));
@@ -2118,7 +2094,7 @@ create table t1 as select password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(41) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(41) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha('a'), hex(sha('a'));
@@ -2128,7 +2104,7 @@ create table t1 as select sha('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(40) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha1('a'), hex(sha1('a'));
@@ -2138,7 +2114,7 @@ create table t1 as select sha1('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(40) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('-1' as signed)));
@@ -2148,7 +2124,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('1' as unsigned)));
@@ -2158,7 +2134,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast(1/2 as decimal(5,5))));
@@ -2217,7 +2193,7 @@ create table t1 as select concat(least(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(greatest(1,2)));
@@ -2227,7 +2203,7 @@ create table t1 as select concat(greatest(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(case when 11 then 22 else 33 end));
@@ -2237,7 +2213,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coalesce(1,2)));
@@ -2247,7 +2223,7 @@ create table t1 as select concat(coalesce(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat_ws(1,2,3));
@@ -2257,7 +2233,7 @@ create table t1 as select concat_ws(1,2,3) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(group_concat(1,2,3));
@@ -2285,7 +2261,7 @@ create table t1 as select concat(last_insert_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(benchmark(0,0)));
@@ -2295,7 +2271,7 @@ create table t1 as select concat(benchmark(0,0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sleep(0)));
@@ -2305,7 +2281,7 @@ create table t1 as select concat(sleep(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(is_free_lock('xxxx')));
@@ -2339,7 +2315,7 @@ create table t1 as select concat(crc32('')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(uncompressed_length('')));
@@ -2356,7 +2332,7 @@ create table t1 as select concat(connection_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(inet_aton('127.1.1.1')));
@@ -2392,7 +2368,7 @@ create table t1 as select concat(row_count()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(found_rows()));
@@ -2402,21 +2378,21 @@ create table t1 as select concat(found_rows()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid_short()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(21) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
@@ -2429,7 +2405,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(37) NOT NULL
+ `c1` varchar(37) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1;
@@ -2449,7 +2425,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL,
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL,
`c2` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -2507,7 +2483,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL,
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL,
`c2` decimal(2,1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -2546,7 +2522,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a'='a' IS NOT TRUE));
@@ -2556,7 +2532,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(NOT 'a'='a'));
@@ -2566,7 +2542,7 @@ create table t1 as select concat(NOT 'a'='a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NULL));
@@ -2576,7 +2552,7 @@ create table t1 as select concat('a' IS NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NOT NULL));
@@ -2586,7 +2562,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' rlike 'a'));
@@ -2596,7 +2572,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(strcmp('a','b')));
@@ -2606,7 +2582,7 @@ create table t1 as select concat(strcmp('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' like 'a'));
@@ -2616,7 +2592,7 @@ create table t1 as select concat('a' like 'b') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' between 'b' and 'c'));
@@ -2626,7 +2602,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' in ('a','b')));
@@ -2636,7 +2612,7 @@ create table t1 as select concat('a' in ('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(interval(23, 1, 15, 17, 30, 44, 200)));
@@ -2646,7 +2622,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a varchar(10), fulltext key(a));
@@ -2678,7 +2654,7 @@ create table t1 as select concat(ifnull(1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ifnull(1.1,1.1)));
@@ -2688,7 +2664,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(if(1,'b',1));
@@ -2718,7 +2694,7 @@ create table t1 as select concat(if(1,1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(nullif(1,2)));
@@ -2883,15 +2859,17 @@ create table t1 as select concat(period_add(200902, 2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(6) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(period_diff(200902, 200802)));
hex(concat(period_diff(200902, 200802)))
00310032
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as select concat(period_add(200902, 200802)) as c1;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -3092,21 +3070,21 @@ create table t1 as select concat(curdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_date()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(curtime()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat('a',20) as c1 limit 0;
@@ -3122,7 +3100,7 @@ create table t1 as select concat(utc_time()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sec_to_time(2378)));
@@ -3215,21 +3193,21 @@ create table t1 as select concat(now()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_timestamp()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(sysdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(19) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(addtime('00:00:00','11:22:33')));
@@ -3269,7 +3247,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(127) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(127) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(insert(1133,3,0,22));
@@ -3279,7 +3257,7 @@ create table t1 as select insert(1133,3,0,22) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(6) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lcase(123));
@@ -3289,7 +3267,7 @@ create table t1 as select lcase(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(123,1));
@@ -3299,7 +3277,7 @@ create table t1 as select left(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lower(123));
@@ -3309,7 +3287,7 @@ create table t1 as select lower(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lpad(1,2,0));
@@ -3319,7 +3297,7 @@ create table t1 as select lpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ltrim(1));
@@ -3329,7 +3307,7 @@ create table t1 as select ltrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(mid(1,1,1));
@@ -3339,7 +3317,7 @@ create table t1 as select mid(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(repeat(1,2));
@@ -3349,7 +3327,7 @@ create table t1 as select repeat(1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(replace(1,1,2));
@@ -3359,7 +3337,7 @@ create table t1 as select replace(1,1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(reverse(12));
@@ -3369,7 +3347,7 @@ create table t1 as select reverse(12) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(right(123,1));
@@ -3379,7 +3357,7 @@ create table t1 as select right(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rpad(1,2,0));
@@ -3389,7 +3367,7 @@ create table t1 as select rpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rtrim(1));
@@ -3399,7 +3377,7 @@ create table t1 as select rtrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(soundex(1));
@@ -3409,7 +3387,7 @@ create table t1 as select soundex(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(substring(1,1,1));
@@ -3419,7 +3397,7 @@ create table t1 as select substring(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(trim(1));
@@ -3429,7 +3407,7 @@ create table t1 as select trim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ucase(1));
@@ -3439,7 +3417,7 @@ create table t1 as select ucase(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(upper(1));
@@ -3449,14 +3427,14 @@ create table t1 as select upper(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(1) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat(' ', 64) as a limit 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET ucs2 NOT NULL
+ `a` varchar(64) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ("1.1"), ("2.1");
select a, hex(a) from t1;
@@ -3686,7 +3664,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -3706,7 +3686,7 @@ create table t2 as select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `concat(a)` varchar(19) CHARACTER SET ucs2 NOT NULL
+ `concat(a)` varchar(19) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a date);
@@ -3998,14 +3978,16 @@ hex(a)
drop table t1;
drop view v1;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
create view v1(a) as select concat(a) from t1;
show columns from v1;
Field Type Null Key Default Extra
-a varchar(19) NO
+a varchar(19) YES NULL
select hex(a) from v1;
hex(a)
0030003000300030002D00300030002D00300030002000300030003A00300030003A00300030
@@ -4256,14 +4238,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET ucs2 NOT NULL
+ `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LCASE(a) FROM t1;
@@ -4284,35 +4266,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPEAT(1,2)` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `REPEAT(1,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LEFT(123,2)` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `LEFT(123,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RIGHT(123,2)` varchar(2) CHARACTER SET ucs2 NOT NULL
+ `RIGHT(123,2)` varchar(2) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LTRIM(123)` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `LTRIM(123)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RTRIM(123)` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `RTRIM(123)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1;
@@ -4326,35 +4308,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPLACE(111,2,3)` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `REPLACE(111,2,3)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET ucs2 NOT NULL
+ `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET ucs2 NOT NULL
+ `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SOUNDEX(1)` varchar(4) CHARACTER SET ucs2 NOT NULL
+ `SOUNDEX(1)` varchar(4) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET ucs2 NOT NULL
+ `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -4534,9 +4516,11 @@ SET NAMES latin1;
#
# Bug #13832953 MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED
#
+SET sql_mode= 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 SET('','') CHARACTER SET ucs2);
Warnings:
Note 1291 Column 'c1' has duplicated value '' in SET
+SET sql_mode=DEFAULT;
INSERT INTO t1 VALUES ('');
SELECT COALESCE(c1) FROM t1 ORDER BY 1;
COALESCE(c1)
@@ -4622,7 +4606,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET ucs2 NOT NULL
+ `a` varchar(5) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -4866,7 +4850,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `a` varchar(5) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -5175,7 +5159,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET ucs2 NOT NULL
+ `a` varchar(64) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('');
SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1;
@@ -5318,7 +5302,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_german2_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET ucs2 COLLATE ucs2_german2_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -5360,10 +5344,11 @@ CREATE TABLE t1 (a DECIMAL(2,0));
SET sql_mode='strict_all_tables';
INSERT INTO t1 VALUES (CONVERT('9e99999999' USING ucs2));
ERROR 22003: Out of range value for column 'a' at row 1
-SET sql_mode=DEFAULT;
+SET sql_mode='';
INSERT INTO t1 VALUES (CONVERT('aaa' USING ucs2));
Warnings:
Warning 1366 Incorrect decimal value: 'aaa' for column 'a' at row 1
+SET sql_mode=DEFAULT;
DROP TABLE t1;
#
# End of 5.6 tests
@@ -5379,7 +5364,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -5402,7 +5387,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -5425,7 +5410,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -5448,7 +5433,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -5474,7 +5459,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin NOT NULL
+ `a` varchar(10) CHARACTER SET ucs2 COLLATE ucs2_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -5500,7 +5485,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -5523,7 +5508,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -5546,7 +5531,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -5569,7 +5554,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `c1` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -5595,7 +5580,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET ucs2 NOT NULL
+ `a` varchar(10) CHARACTER SET ucs2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
diff --git a/mysql-test/r/ctype_ujis.result b/mysql-test/r/ctype_ujis.result
index 90db3474cef..773e962ac0b 100644
--- a/mysql-test/r/ctype_ujis.result
+++ b/mysql-test/r/ctype_ujis.result
@@ -2331,30 +2331,18 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
SET collation_connection='ujis_bin';
create table t1 select repeat('a',4000) a;
@@ -2478,31 +2466,20 @@ CREATE TABLE t1 AS
SELECT 10 AS a, REPEAT('a',20) AS b, REPEAT('a',8) AS c, REPEAT('a',8) AS d;
ALTER TABLE t1 ADD PRIMARY KEY(a), ADD KEY(b);
INSERT INTO t1 (a, b) VALUES (1, repeat(0xF1F2,5));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (2, repeat(0xF1F2,10));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (3, repeat(0xF1F2,11));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
INSERT INTO t1 (a, b) VALUES (4, repeat(0xF1F2,12));
-Warnings:
-Warning 1364 Field 'c' doesn't have a default value
-Warning 1364 Field 'd' doesn't have a default value
SELECT hex(concat(repeat(0xF1F2, 10), '%'));
hex(concat(repeat(0xF1F2, 10), '%'))
F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F225
3 rows expected
SELECT a, hex(b), c FROM t1 WHERE b LIKE concat(repeat(0xF1F2,10), '%');
a hex(b) c
-2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
-4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2
+2 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+3 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
+4 F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2F1F2 NULL
DROP TABLE t1;
+set sql_mode='';
select hex(convert(_ujis 0xA5FE41 using ucs2));
hex(convert(_ujis 0xA5FE41 using ucs2))
003F0041
@@ -2513,6 +2490,7 @@ hex(convert(_ujis 0x8FABF841 using ucs2))
003F0041
Warnings:
Warning 1977 Cannot convert 'ujis' character 0x8FABF8 to 'ucs2'
+set sql_mode=default;
DROP TABLE IF EXISTS t1, t2;
DROP PROCEDURE IF EXISTS sp1;
set names ujis;
@@ -2569,18 +2547,18 @@ CREATE TEMPORARY TABLE head AS SELECT concat(b1.b, b2.b) AS head FROM t1 b1, t1
CREATE TEMPORARY TABLE tail AS SELECT concat(b1.b, b2.b) AS tail FROM t1 b1, t1 b2;
DROP TABLE t1;
CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0;
-INSERT INTO t1 (code) SELECT concat('8E', head) FROM head
+INSERT IGNORE INTO t1 (code) SELECT concat('8E', head) FROM head
WHERE (head BETWEEN 'A1' AND 'DF') ORDER BY head;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
-INSERT INTO t1 (code) SELECT concat(head, tail)
+INSERT IGNORE INTO t1 (code) SELECT concat(head, tail)
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (head NOT BETWEEN '8E' AND '8F')
AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
Warnings:
Warning 1364 Field 'a' doesn't have a default value
-INSERT INTO t1 (code) SELECT concat('8F', head, tail)
+INSERT IGNORE INTO t1 (code) SELECT concat('8F', head, tail)
FROM head, tail
WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '80' AND 'FF')
ORDER BY head, tail;
@@ -2593,7 +2571,7 @@ t1 CREATE TABLE `t1` (
`code` varchar(6) CHARACTER SET ujis NOT NULL,
`a` varchar(1) CHARACTER SET ujis NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
Warnings:
Warning 1366 Incorrect string value: '\x80 ' for column 'a' at row 1
Warning 1366 Incorrect string value: '\x80!' for column 'a' at row 2
@@ -3084,69 +3062,69 @@ code a
8FAABC Ģ
Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8'
SELECT * FROM t1
WHERE HEX(CAST(UPPER(a) AS CHAR CHARACTER SET utf8)) <>
HEX(UPPER(CAST(a AS CHAR CHARACTER SET utf8))) ORDER BY code;
@@ -3155,69 +3133,69 @@ code a
8FABB9 ǵ
Warnings:
Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2AF to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B0 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2B9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C6 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C7 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C8 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2C9 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D1 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D2 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D3 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D4 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D5 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D6 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D7 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D8 to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2D9 to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2DA to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2DB to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EB to 'utf8'
-Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
Warning 1977 Cannot convert 'ujis' character 0xA2EC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2ED to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2EF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2F0 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2F1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA2FD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A1 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A2 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A3 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A4 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A5 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A6 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A7 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A8 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3A9 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3AF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BA to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BB to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BC to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BD to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BE to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3BF to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3C0 to 'utf8'
+Warning 1977 Cannot convert 'ujis' character 0xA3DB to 'utf8'
#
# WL#3090 Japanese Character Set adjustments
# Test sjis->Unicode conversion
@@ -25318,7 +25296,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET ujis NOT NULL
+ `a` varchar(5) CHARACTER SET ujis DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -25751,7 +25729,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET ujis COLLATE ujis_bin NOT NULL
+ `a` varchar(5) CHARACTER SET ujis COLLATE ujis_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -26166,7 +26144,7 @@ hex(weight_string(cast(0x8FA2C38FA2C38FA2C3 as char),25, 4, 0xC0))
# MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence
#
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET ujis);
-INSERT INTO t1 VALUES (0x8EA0);
+INSERT IGNORE INTO t1 VALUES (0x8EA0);
SELECT HEX(a), CHAR_LENGTH(a) FROM t1;
HEX(a) CHAR_LENGTH(a)
3F3F 2
@@ -26225,7 +26203,7 @@ DROP TABLE t1;
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET ujis);
-LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES;
+LOAD DATA INFILE '../../std_data/loaddata/mdev9823.ujis.txt' IGNORE INTO TABLE t1 CHARACTER SET ujis IGNORE 4 LINES;
SELECT HEX(a) FROM t1;
HEX(a)
3F
diff --git a/mysql-test/r/ctype_ujis_ucs2.result b/mysql-test/r/ctype_ujis_ucs2.result
index 3c63e7c0441..77961046346 100644
--- a/mysql-test/r/ctype_ujis_ucs2.result
+++ b/mysql-test/r/ctype_ujis_ucs2.result
@@ -1138,7 +1138,7 @@ update t1 set name='U+9FA3 <CJK>' where ujis=0x8FEDE2;
update t1 set name='U+9FA5 <CJK>' where ujis=0x8FEDE3;
update t1 set name='User defined range #2' where ujis >= 0x8FF5A1 and ujis <= 0x8FFEFE;
update t1 set name='UNASSIGNED' where name='';
-update t1 set ucs2=ujis, ujis2=ucs2;
+update ignore t1 set ucs2=ujis, ujis2=ucs2;
Warnings:
Warning 1366 Incorrect string value: '\xA2\xAF' for column 'ucs2' at row 237
Warning 1366 Incorrect string value: '\xA2\xB0' for column 'ucs2' at row 238
@@ -19129,7 +19129,7 @@ insert into t1 (ucs2,name) values (0xFFE0,'U+FFE0 FULLWIDTH CENT SIGN');
insert into t1 (ucs2,name) values (0xFFE1,'U+FFE1 FULLWIDTH POUND SIGN');
insert into t1 (ucs2,name) values (0xFFE2,'U+FFE2 FULLWIDTH NOT SIGN');
insert into t1 (ucs2,name) values (0xFFE4,'U+FFE4 FULLWIDTH BROKEN BAR');
-update t1 set ujis=ucs2;
+update ignore t1 set ujis=ucs2;
Warnings:
Warning 1366 Incorrect string value: '\x00\xA5' for column 'ujis' at row 1
Warning 1366 Incorrect string value: '\x20\x14' for column 'ujis' at row 2
diff --git a/mysql-test/r/ctype_utf16.result b/mysql-test/r/ctype_utf16.result
index 3f483c43902..26d74e345f9 100644
--- a/mysql-test/r/ctype_utf16.result
+++ b/mysql-test/r/ctype_utf16.result
@@ -101,8 +101,8 @@ RPAD(_utf16 X'0420',10,_utf16 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `l` varchar(10) CHARACTER SET utf16 NOT NULL,
- `r` varchar(10) CHARACTER SET utf16 NOT NULL
+ `l` varchar(10) CHARACTER SET utf16 DEFAULT NULL,
+ `r` varchar(10) CHARACTER SET utf16 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(l), hex(r) from t1;
hex(l) hex(r)
@@ -755,7 +755,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL
+ `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84);
INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080);
@@ -1012,16 +1012,18 @@ DBFFDCFF
drop table t1;
create table t1 (s1 varchar(50) character set ucs2);
insert into t1 values (0xdf84);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify column s1 varchar(50) character set utf16;
Warnings:
Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1
+SET sql_mode = DEFAULT;
select hex(s1) from t1;
hex(s1)
003F
drop table t1;
create table t1 (s1 varchar(5) character set ucs2, s2 varchar(5) character set utf16);
insert into t1 (s1) values (0xdf84);
-update t1 set s2 = s1;
+update ignore t1 set s2 = s1;
Warnings:
Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1
select hex(s2) from t1;
@@ -1250,7 +1252,7 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x'
create table t1 (a int);
insert into t1 values ('-1234.1e2');
-insert into t1 values ('-1234.1e2xxxx');
+insert ignore into t1 values ('-1234.1e2xxxx');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values ('-1234.1e2 ');
@@ -1266,7 +1268,7 @@ create table t1 (a int);
insert into t1 values ('1 ');
Warnings:
Note 1265 Data truncated for column 'a' at row 1
-insert into t1 values ('1 x');
+insert ignore into t1 values ('1 x');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -1274,9 +1276,11 @@ a
1
1
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(17000) character set utf16);
Warnings:
Note 1246 Converting column 'a' from VARCHAR to TEXT
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1419,7 +1423,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET utf16 NOT NULL
+ `a` varchar(64) CHARACTER SET utf16 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('');
SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1;
@@ -1468,7 +1472,7 @@ CREATE TABLE t1 AS SELECT repeat('a',2) as s1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `s1` varchar(2) CHARACTER SET utf16 NOT NULL
+ `s1` varchar(2) CHARACTER SET utf16 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE');
SELECT * FROM t1 ORDER BY s1;
@@ -1626,7 +1630,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf16 NOT NULL
+ `a` varchar(5) CHARACTER SET utf16 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1876,7 +1880,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_bin NOT NULL
+ `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_utf16_uca.result b/mysql-test/r/ctype_utf16_uca.result
index 0c478222650..1105225ed87 100644
--- a/mysql-test/r/ctype_utf16_uca.result
+++ b/mysql-test/r/ctype_utf16_uca.result
@@ -2810,7 +2810,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -3045,7 +3045,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -3228,7 +3228,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_unicode_ci NOT NULL
+ `a` varchar(5) CHARACTER SET utf16 COLLATE utf16_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3695,7 +3695,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_german2_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf16 COLLATE utf16_german2_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -3726,7 +3726,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c` varchar(10) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci NOT NULL
+ `c` varchar(10) CHARACTER SET utf16 COLLATE utf16_unicode_520_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A);
INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C);
@@ -3999,7 +3999,7 @@ D801DC28 30D2 𐐚
ALTER TABLE t1 ADD KEY(c);
EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index
+1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index
SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
hex(c) hex(weight_string(c))
0061 120F
@@ -4042,7 +4042,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `s1` varchar(64) CHARACTER SET utf16 COLLATE utf16_myanmar_ci NOT NULL,
+ `s1` varchar(64) CHARACTER SET utf16 COLLATE utf16_myanmar_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (s1) VALUES
@@ -6628,7 +6628,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(3) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL
+ `a` varchar(3) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2));
SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1;
@@ -6661,7 +6661,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_ucs2 0x3400);
INSERT INTO t1 VALUES (_ucs2 0xF001);
@@ -6674,7 +6674,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a;
@@ -6733,7 +6733,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf16 COLLATE utf16_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('cota'),('cote'),('cotz');
INSERT INTO t1 VALUES ('coté'),('cÎte'),('cÎté'),('cotë'),('cÎtë');
diff --git a/mysql-test/r/ctype_utf16le.result b/mysql-test/r/ctype_utf16le.result
index 1ba2cf600a4..b79f6564e06 100644
--- a/mysql-test/r/ctype_utf16le.result
+++ b/mysql-test/r/ctype_utf16le.result
@@ -82,7 +82,7 @@ CREATE TABLE t1 (a VARCHAR(10), pad INT, b VARCHAR(10)) CHARACTER SET utf16le;
INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'0421');
INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'04210422');
INSERT INTO t1 VALUES (_ucs2 X'0420', 10, _ucs2 X'042104220423');
-INSERT INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
+INSERT IGNORE INTO t1 VALUES (_ucs2 X'0420042104220423042404250426042704280429042A042B',10,_ucs2 X'042104220423');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
INSERT INTO t1 VALUES (_utf32 X'010000', 10, _ucs2 X'0421');
@@ -102,8 +102,8 @@ RPAD(_utf16le X'2004',10,_utf16le X'2104') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `l` varchar(10) CHARACTER SET utf16le NOT NULL,
- `r` varchar(10) CHARACTER SET utf16le NOT NULL
+ `l` varchar(10) CHARACTER SET utf16le DEFAULT NULL,
+ `r` varchar(10) CHARACTER SET utf16le DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT HEX(l), HEX(r) FROM t1;
HEX(l) HEX(r)
@@ -798,7 +798,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL
+ `a` varchar(1) CHARACTER SET utf16le COLLATE utf16le_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84);
INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080);
@@ -1121,9 +1121,11 @@ DROP TABLE t1;
#
CREATE TABLE t1 (s1 VARCHAR(50) CHARACTER SET ucs2);
INSERT INTO t1 VALUES (0xDF84);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY column s1 VARCHAR(50) CHARACTER SET utf16le;
Warnings:
Warning 1366 Incorrect string value: '\xDF\x84' for column 's1' at row 1
+SET sql_mode = DEFAULT;
SELECT HEX(s1) FROM t1;
HEX(s1)
3F00
@@ -1133,7 +1135,7 @@ DROP TABLE t1;
#
CREATE TABLE t1 (s1 VARCHAR(5) CHARACTER SET ucs2, s2 VARCHAR(5) CHARACTER SET utf16le);
INSERT INTO t1 (s1) VALUES (0xdf84);
-UPDATE t1 set s2 = s1;
+UPDATE IGNORE t1 set s2 = s1;
Warnings:
Warning 1366 Incorrect string value: '\xDF\x84' for column 's2' at row 1
SELECT HEX(s2) FROM t1;
@@ -1470,7 +1472,7 @@ Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x'
#
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('-1234.1e2');
-INSERT INTO t1 VALUES ('-1234.1e2xxxx');
+INSERT IGNORE INTO t1 VALUES ('-1234.1e2xxxx');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
INSERT INTO t1 VALUES ('-1234.1e2 ');
@@ -1524,7 +1526,7 @@ CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('1 ');
Warnings:
Note 1265 Data truncated for column 'a' at row 1
-INSERT INTO t1 VALUES ('1 x');
+INSERT IGNORE INTO t1 VALUES ('1 x');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
@@ -1535,9 +1537,11 @@ DROP TABLE t1;
#
# Testing auto-conversion to TEXT
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a VARCHAR(17000) CHARACTER SET utf16le);
Warnings:
Note 1246 Converting column 'a' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1690,7 +1694,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET utf16le NOT NULL
+ `a` varchar(64) CHARACTER SET utf16le DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('');
SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1;
@@ -1741,7 +1745,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',2) as s1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `s1` varchar(2) CHARACTER SET utf16le NOT NULL
+ `s1` varchar(2) CHARACTER SET utf16le DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE');
SELECT * FROM t1 ORDER BY s1;
@@ -1854,7 +1858,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf16le NOT NULL
+ `a` varchar(5) CHARACTER SET utf16le DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -2104,7 +2108,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf16le COLLATE utf16le_bin NOT NULL
+ `a` varchar(5) CHARACTER SET utf16le COLLATE utf16le_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_utf32.result b/mysql-test/r/ctype_utf32.result
index ab2f8b14c41..74f5b587612 100644
--- a/mysql-test/r/ctype_utf32.result
+++ b/mysql-test/r/ctype_utf32.result
@@ -100,8 +100,8 @@ RPAD(_utf32 X'0420',10,_utf32 X'0421') r;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `l` varchar(10) CHARACTER SET utf32 NOT NULL,
- `r` varchar(10) CHARACTER SET utf32 NOT NULL
+ `l` varchar(10) CHARACTER SET utf32 DEFAULT NULL,
+ `r` varchar(10) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(l), hex(r) from t1;
hex(l) hex(r)
@@ -754,7 +754,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
+ `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84);
INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080);
@@ -983,31 +983,31 @@ hex(a)
drop table t1;
create table t1 (utf32 varchar(2) character set utf32);
Wrong character with pad
-insert into t1 values (0x110000);
+insert ignore into t1 values (0x110000);
Warnings:
Warning 1366 Incorrect string value: '\x11\x00\x00' for column 'utf32' at row 1
Wrong chsaracter without pad
-insert into t1 values (0x00110000);
+insert ignore into t1 values (0x00110000);
Warnings:
Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
Wrong character with pad followed by another wrong character
-insert into t1 values (0x11000000110000);
+insert ignore into t1 values (0x11000000110000);
Warnings:
Warning 1366 Incorrect string value: '\x11\x00\x00\x00\x11\x00...' for column 'utf32' at row 1
Good character with pad followed by bad character
-insert into t1 values (0x10000000110000);
+insert ignore into t1 values (0x10000000110000);
Warnings:
Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
Good character without pad followed by bad character
-insert into t1 values (0x0010000000110000);
+insert ignore into t1 values (0x0010000000110000);
Warnings:
Warning 1366 Incorrect string value: '\x00\x11\x00\x00' for column 'utf32' at row 1
Wrong character with the second byte higher than 0x10
-insert into t1 values (0x00800037);
+insert ignore into t1 values (0x00800037);
Warnings:
Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1
Wrong character with pad with the second byte higher than 0x10
-insert into t1 values (0x00800037);
+insert ignore into t1 values (0x00800037);
Warnings:
Warning 1366 Incorrect string value: '\x00\x80\x007' for column 'utf32' at row 1
drop table t1;
@@ -1248,7 +1248,7 @@ Warnings:
Warning 1292 Truncated incorrect INTEGER value: '123456789123456789123x'
create table t1 (a int);
insert into t1 values ('-1234.1e2');
-insert into t1 values ('-1234.1e2xxxx');
+insert ignore into t1 values ('-1234.1e2xxxx');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values ('-1234.1e2 ');
@@ -1264,7 +1264,7 @@ create table t1 (a int);
insert into t1 values ('1 ');
Warnings:
Note 1265 Data truncated for column 'a' at row 1
-insert into t1 values ('1 x');
+insert ignore into t1 values ('1 x');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -1272,9 +1272,11 @@ a
1
1
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(17000) character set utf32);
Warnings:
Note 1246 Converting column 'a' from VARCHAR to TEXT
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1367,7 +1369,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 64) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET utf32 NOT NULL
+ `a` varchar(64) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('');
SELECT CHARSET(CONCAT(a,'2001-01-08 00:00:00' - INTERVAL 7 DAY)) FROM t1;
@@ -1467,7 +1469,7 @@ hex(char(0x010203 using utf32))
00010203
select hex(char(0x01020304 using utf32));
hex(char(0x01020304 using utf32))
-
+NULL
Warnings:
Warning 1300 Invalid utf32 character string: '010203'
create table t1 (s1 varchar(1) character set utf32, s2 text character set utf32);
@@ -1482,7 +1484,7 @@ CREATE TABLE t1 AS SELECT repeat('a',2) as s1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `s1` varchar(2) CHARACTER SET utf32 NOT NULL
+ `s1` varchar(2) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ab'),('AE'),('ab'),('AE');
SELECT * FROM t1 ORDER BY s1;
@@ -1558,12 +1560,12 @@ DROP TABLE t1;
#
CREATE TABLE t1 (utf32 CHAR(5) CHARACTER SET utf32, latin1 CHAR(5) CHARACTER SET latin1);
INSERT INTO t1 (utf32) VALUES (0xc581);
-UPDATE t1 SET latin1 = utf32;
+UPDATE IGNORE t1 SET latin1 = utf32;
Warnings:
Warning 1366 Incorrect string value: '\x00\x00\xC5\x81' for column 'latin1' at row 1
DELETE FROM t1;
INSERT INTO t1 (utf32) VALUES (0x100cc);
-UPDATE t1 SET latin1 = utf32;
+UPDATE IGNORE t1 SET latin1 = utf32;
Warnings:
Warning 1366 Incorrect string value: '\x00\x01\x00\xCC' for column 'latin1' at row 1
DROP TABLE t1;
@@ -1575,7 +1577,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 NOT NULL
+ `format(123,2,'no_NO')` varchar(45) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
@@ -1660,11 +1662,13 @@ CHAR_LENGTH(TRIM(BOTH 0x61 FROM _utf32 0x00000061))
SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061))
1
+SET sql_mode='';
select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
c
0000003F0000003F0000003F0000003F
Warnings:
Warning 1300 Invalid utf32 character string: '\xFF\xFF\x00\x00'
+SET sql_mode=DEFAULT;
#
# MDEV-11685: sql_mode can't be set with non-ascii connection charset
#
@@ -1712,7 +1716,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf32 NOT NULL
+ `a` varchar(5) CHARACTER SET utf32 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -1962,7 +1966,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_bin NOT NULL
+ `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
diff --git a/mysql-test/r/ctype_utf32_uca.result b/mysql-test/r/ctype_utf32_uca.result
index 08b0dbe999a..097da3d7c16 100644
--- a/mysql-test/r/ctype_utf32_uca.result
+++ b/mysql-test/r/ctype_utf32_uca.result
@@ -2810,7 +2810,7 @@ want1result
location
DROP TABLE t1;
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select cast(a as char(1)) from t1;
@@ -3045,7 +3045,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -3248,7 +3248,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_unicode_ci NOT NULL
+ `a` varchar(5) CHARACTER SET utf32 COLLATE utf32_unicode_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3715,7 +3715,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_german2_ci NOT NULL,
+ `a` varchar(1) CHARACTER SET utf32 COLLATE utf32_german2_ci DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -3746,7 +3746,7 @@ CREATE TABLE t1 AS SELECT repeat('a', 10) as c LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c` varchar(10) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci NOT NULL
+ `c` varchar(10) CHARACTER SET utf32 COLLATE utf32_unicode_520_ci DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf32 0x0180),(_utf32 0x023A);
INSERT INTO t1 VALUES (_utf32 0x023B),(_utf32 0x023C);
@@ -4019,7 +4019,7 @@ hex(c) hex(weight_string(c)) c
ALTER TABLE t1 ADD KEY(c);
EXPLAIN SELECT hex(c) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 range c c 42 NULL 2 Using where; Using index
+1 SIMPLE t1 range c c 43 NULL 2 Using where; Using index
SELECT hex(c), hex(weight_string(c)) FROM t1 WHERE c LIKE 'a%' ORDER BY c;
hex(c) hex(weight_string(c))
00000061 120F
@@ -4062,7 +4062,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `s1` varchar(64) CHARACTER SET utf32 COLLATE utf32_myanmar_ci NOT NULL,
+ `s1` varchar(64) CHARACTER SET utf32 COLLATE utf32_myanmar_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (s1) VALUES
@@ -6648,7 +6648,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(3) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL
+ `a` varchar(3) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2));
SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1;
@@ -6681,7 +6681,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_ucs2 0x3400);
INSERT INTO t1 VALUES (_ucs2 0xF001);
@@ -6694,7 +6694,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a;
@@ -6753,7 +6753,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf32 COLLATE utf32_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('cota'),('cote'),('cotz');
INSERT INTO t1 VALUES ('coté'),('cÎte'),('cÎté'),('cotë'),('cÎtë');
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index 06ff25b5d26..2d4cfc7983d 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -156,6 +156,7 @@ F0CEC4 ПМЎ
drop table t1;
set LC_TIME_NAMES='en_US';
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8);
insert into t1 values (_koi8r'ÁÂ');
Warnings:
@@ -219,6 +220,8 @@ length(s1) char_length(s1)
65535 43690
65534 32767
drop table t1;
+set sql_mode=default;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8);
insert into t1 values (0x41FF);
Warnings:
@@ -243,6 +246,7 @@ select hex(s1) from t1;
hex(s1)
413F
drop table t1;
+set sql_mode=default;
create table t1 (a text character set utf8, primary key(a(371)));
ERROR 42000: Specified key was too long; max key length is 1000 bytes
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8;
@@ -901,8 +905,8 @@ create table t2 select concat(a,_utf8'') as a, concat(b,_utf8'')as b from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` varchar(5) CHARACTER SET utf8 NOT NULL,
- `b` varchar(15) CHARACTER SET utf8 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8 DEFAULT NULL,
+ `b` varchar(15) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
@@ -1126,7 +1130,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8 NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -1160,8 +1164,8 @@ STR_TO_DATE(CAST(_utf8'2001÷01÷01' AS CHAR),CAST(_utf8'%Y÷%m÷%d' AS CHAR))
CREATE TABLE t1 AS SELECT REPEAT(' ', 64) AS subject, REPEAT(' ',64) AS pattern LIMIT 0;
SHOW COLUMNS FROM t1;
Field Type Null Key Default Extra
-subject varchar(64) NO NULL
-pattern varchar(64) NO NULL
+subject varchar(64) YES NULL
+pattern varchar(64) YES NULL
INSERT INTO t1 VALUES (_utf8'2001÷01÷01',_utf8'%Y÷%m÷%d');
SELECT HEX(subject),HEX(pattern),STR_TO_DATE(subject, pattern) FROM t1;
HEX(subject) HEX(pattern) STR_TO_DATE(subject, pattern)
@@ -1352,6 +1356,7 @@ ERROR 42000: Invalid default value for 'x'
create table t1 (x enum('A', 'B') default 0) character set utf8;
ERROR 42000: Invalid default value for 'x'
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
@@ -1385,12 +1390,15 @@ content msisdn
ERR ИЌрО.АфОЌОЌ.АеОЌОЌрОЌЎЌрОЌрЌрОрПр ОЌрОЌрОЌрОЌр ОЌрОЎЌ ОрбЎМрОЌрфЌрОрОрОЌрфЌфЌОЌ.АЎ.Д ОЌЎОЌрОЌраЎ.АЎОЌрОЌрОЌрЌЎОрОЌрОЌрОЌр ÐŒ.ДаЎОЌфшьЌрОЌЎ ОЌ.АЎОЌОЌрМ ОЌаЎЌО 1234567890
11 g 1234567890
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a char(20) character set utf8);
insert into t1 values ('123456'),('аМЎрей');
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
+set sql_mode = default;
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
@@ -1856,6 +1864,7 @@ aa
xxx
yyy
DROP TABLE t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8;
@@ -1899,6 +1908,8 @@ select length(a) from t1;
length(a)
3000
drop table t1;
+set sql_mode = default;
+set sql_mode = '';
set names utf8;
select hex(char(1 using utf8));
hex(char(1 using utf8))
@@ -1948,6 +1959,7 @@ convert(char(0xff,0x8f) using utf8)
NULL
Warnings:
Warning 1300 Invalid utf8 character string: '\xFF\x8F'
+set sql_mode = default;
select hex(convert(char(2557 using latin1) using utf8));
hex(convert(char(2557 using latin1) using utf8))
09C3BD
@@ -2125,7 +2137,7 @@ select hex(_utf8 B'001111111111');
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
-set sql_mode=default;
+set sql_mode='';
select hex(char(0xFF using utf8));
hex(char(0xFF using utf8))
@@ -2144,6 +2156,7 @@ select hex(_utf8 B'001111111111');
ERROR HY000: Invalid utf8 character string: 'FF'
select (_utf8 X'616263FF');
ERROR HY000: Invalid utf8 character string: 'FF'
+set sql_mode=default;
#
# Bug#44131 Binary-mode "order by" returns records in incorrect order for UTF-8 strings
#
@@ -2464,7 +2477,7 @@ create table t1 as select concat(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -2477,7 +2490,7 @@ create table t1 as select concat(18446744073709551615) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(20) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(20) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -2490,7 +2503,7 @@ create table t1 as select concat(1.1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select hex(c1) from t1;
hex(c1)
@@ -2503,7 +2516,7 @@ create table t1 as select concat(1+2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1-2));
@@ -2513,7 +2526,7 @@ create table t1 as select concat(1-2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1*2));
@@ -2523,7 +2536,7 @@ create table t1 as select concat(1*2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1/2));
@@ -2563,7 +2576,7 @@ create table t1 as select concat(-1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(-(1+2)));
@@ -2573,7 +2586,7 @@ create table t1 as select concat(-(1+2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1|2));
@@ -2583,7 +2596,7 @@ create table t1 as select concat(1|2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(1&2));
@@ -2593,7 +2606,7 @@ create table t1 as select concat(1&2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_count(12)));
@@ -2603,7 +2616,7 @@ create table t1 as select concat(bit_count(12)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2<<1));
@@ -2613,7 +2626,7 @@ create table t1 as select concat(2<<1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(2>>1));
@@ -2623,7 +2636,7 @@ create table t1 as select concat(2>>1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(~0));
@@ -2633,7 +2646,7 @@ create table t1 as select concat(~0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(3^2));
@@ -2643,7 +2656,7 @@ create table t1 as select concat(3^2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(abs(-2)));
@@ -2653,7 +2666,7 @@ create table t1 as select concat(abs(-2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(concat(exp(2)),1));
@@ -2783,7 +2796,7 @@ create table t1 as select concat(degrees(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(radians(0)));
@@ -2793,7 +2806,7 @@ create table t1 as select concat(radians(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ceiling(0.5)));
@@ -2803,7 +2816,7 @@ create table t1 as select concat(ceiling(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(floor(0.5)));
@@ -2813,7 +2826,7 @@ create table t1 as select concat(floor(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(round(0.5)));
@@ -2823,7 +2836,7 @@ create table t1 as select concat(round(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sign(0.5)));
@@ -2833,14 +2846,14 @@ create table t1 as select concat(sign(0.5)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(rand()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(23) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(23) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(length('a')));
@@ -2850,7 +2863,7 @@ create table t1 as select concat(length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(char_length('a')));
@@ -2860,7 +2873,7 @@ create table t1 as select concat(char_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(bit_length('a')));
@@ -2870,7 +2883,7 @@ create table t1 as select concat(bit_length('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coercibility('a')));
@@ -2880,7 +2893,7 @@ create table t1 as select concat(coercibility('a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(locate('a','a')));
@@ -2890,7 +2903,7 @@ create table t1 as select concat(locate('a','a')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(11) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(11) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(field('c','a','b','c')));
@@ -2900,7 +2913,7 @@ create table t1 as select concat(field('c','a','b','c')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ascii(61)));
@@ -2910,7 +2923,7 @@ create table t1 as select concat(ascii(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ord(61)));
@@ -2920,7 +2933,7 @@ create table t1 as select concat(ord(61)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(find_in_set('b','a,b,c,d')));
@@ -2930,7 +2943,7 @@ create table t1 as select concat(find_in_set('b','a,b,c,d')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select md5('a'), hex(md5('a'));
@@ -2940,7 +2953,7 @@ create table t1 as select md5('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(32) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(32) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select old_password('a'), hex(old_password('a'));
@@ -2950,7 +2963,7 @@ create table t1 as select old_password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(16) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(16) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select password('a'), hex(password('a'));
@@ -2960,7 +2973,7 @@ create table t1 as select password('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(41) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(41) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha('a'), hex(sha('a'));
@@ -2970,7 +2983,7 @@ create table t1 as select sha('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(40) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select sha1('a'), hex(sha1('a'));
@@ -2980,7 +2993,7 @@ create table t1 as select sha1('a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(40) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(40) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('-1' as signed)));
@@ -2990,7 +3003,7 @@ create table t1 as select concat(cast('-1' as signed)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast('1' as unsigned)));
@@ -3000,7 +3013,7 @@ create table t1 as select concat(cast('1' as unsigned)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(cast(1/2 as decimal(5,5))));
@@ -3059,7 +3072,7 @@ create table t1 as select concat(least(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(greatest(1,2)));
@@ -3069,7 +3082,7 @@ create table t1 as select concat(greatest(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(case when 11 then 22 else 33 end));
@@ -3079,7 +3092,7 @@ create table t1 as select concat(case when 11 then 22 else 33 end) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(coalesce(1,2)));
@@ -3089,7 +3102,7 @@ create table t1 as select concat(coalesce(1,2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat_ws(1,2,3));
@@ -3099,7 +3112,7 @@ create table t1 as select concat_ws(1,2,3) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(group_concat(1,2,3));
@@ -3127,7 +3140,7 @@ create table t1 as select concat(last_insert_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(benchmark(0,0)));
@@ -3137,7 +3150,7 @@ create table t1 as select concat(benchmark(0,0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sleep(0)));
@@ -3147,7 +3160,7 @@ create table t1 as select concat(sleep(0)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(is_free_lock('xxxx')));
@@ -3181,7 +3194,7 @@ create table t1 as select concat(crc32('')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(uncompressed_length('')));
@@ -3198,7 +3211,7 @@ create table t1 as select concat(connection_id()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(inet_aton('127.1.1.1')));
@@ -3234,7 +3247,7 @@ create table t1 as select concat(row_count()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(found_rows()));
@@ -3244,21 +3257,21 @@ create table t1 as select concat(found_rows()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid_short()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(21) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(21) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(uuid()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(36) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(36) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select coercibility(uuid()), coercibility(cast('a' as char character set latin1));
@@ -3271,7 +3284,7 @@ create table t1 as select concat(uuid(), cast('a' as char character set latin1))
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(37) NOT NULL
+ `c1` varchar(37) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(master_pos_wait('non-existent',0,2)) as c1;
@@ -3291,7 +3304,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL,
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL,
`c2` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -3349,7 +3362,7 @@ hex(c1)
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL,
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL,
`c2` decimal(2,1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -3388,7 +3401,7 @@ create table t1 as select concat('a'='a' IS TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a'='a' IS NOT TRUE));
@@ -3398,7 +3411,7 @@ create table t1 as select concat('a'='a' IS NOT TRUE) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(NOT 'a'='a'));
@@ -3408,7 +3421,7 @@ create table t1 as select concat(NOT 'a'='a') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NULL));
@@ -3418,7 +3431,7 @@ create table t1 as select concat('a' IS NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' IS NOT NULL));
@@ -3428,7 +3441,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' rlike 'a'));
@@ -3438,7 +3451,7 @@ create table t1 as select concat('a' IS NOT NULL) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(strcmp('a','b')));
@@ -3448,7 +3461,7 @@ create table t1 as select concat(strcmp('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' like 'a'));
@@ -3458,7 +3471,7 @@ create table t1 as select concat('a' like 'b') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' between 'b' and 'c'));
@@ -3468,7 +3481,7 @@ create table t1 as select concat('a' between 'b' and 'c') as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat('a' in ('a','b')));
@@ -3478,7 +3491,7 @@ create table t1 as select concat('a' in ('a','b')) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(interval(23, 1, 15, 17, 30, 44, 200)));
@@ -3488,7 +3501,7 @@ create table t1 as select concat(interval(23, 1, 15, 17, 30, 44, 200)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a varchar(10), fulltext key(a));
@@ -3520,7 +3533,7 @@ create table t1 as select concat(ifnull(1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(ifnull(1.1,1.1)));
@@ -3530,7 +3543,7 @@ create table t1 as select concat(ifnull(1.1,1.1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(if(1,'b',1));
@@ -3560,7 +3573,7 @@ create table t1 as select concat(if(1,1,1)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(nullif(1,2)));
@@ -3725,15 +3738,17 @@ create table t1 as select concat(period_add(200902, 2)) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(6) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(period_diff(200902, 200802)));
hex(concat(period_diff(200902, 200802)))
3132
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as select concat(period_add(200902, 200802)) as c1;
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
+set sql_mode = default;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -3934,21 +3949,21 @@ create table t1 as select concat(curdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_date()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(curtime()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat('a',20) as c1 limit 0;
@@ -3964,7 +3979,7 @@ create table t1 as select concat(utc_time()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(sec_to_time(2378)));
@@ -4057,21 +4072,21 @@ create table t1 as select concat(now()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(utc_timestamp()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select concat(sysdate()) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(19) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(19) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(concat(addtime('00:00:00','11:22:33')));
@@ -4111,7 +4126,7 @@ create table t1 as select export_set(1,2,3,4,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(127) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(127) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(insert(1133,3,0,22));
@@ -4121,7 +4136,7 @@ create table t1 as select insert(1133,3,0,22) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(6) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(6) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lcase(123));
@@ -4131,7 +4146,7 @@ create table t1 as select lcase(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(left(123,1));
@@ -4141,7 +4156,7 @@ create table t1 as select left(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lower(123));
@@ -4151,7 +4166,7 @@ create table t1 as select lower(123) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(3) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(lpad(1,2,0));
@@ -4161,7 +4176,7 @@ create table t1 as select lpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ltrim(1));
@@ -4171,7 +4186,7 @@ create table t1 as select ltrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(mid(1,1,1));
@@ -4181,7 +4196,7 @@ create table t1 as select mid(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(repeat(1,2));
@@ -4191,7 +4206,7 @@ create table t1 as select repeat(1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(replace(1,1,2));
@@ -4201,7 +4216,7 @@ create table t1 as select replace(1,1,2) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(reverse(12));
@@ -4211,7 +4226,7 @@ create table t1 as select reverse(12) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(right(123,1));
@@ -4221,7 +4236,7 @@ create table t1 as select right(123,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rpad(1,2,0));
@@ -4231,7 +4246,7 @@ create table t1 as select rpad(1,2,0) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(2) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(rtrim(1));
@@ -4241,7 +4256,7 @@ create table t1 as select rtrim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(soundex(1));
@@ -4251,7 +4266,7 @@ create table t1 as select soundex(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(4) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(substring(1,1,1));
@@ -4261,7 +4276,7 @@ create table t1 as select substring(1,1,1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(trim(1));
@@ -4271,7 +4286,7 @@ create table t1 as select trim(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(ucase(1));
@@ -4281,7 +4296,7 @@ create table t1 as select ucase(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select hex(upper(1));
@@ -4291,14 +4306,14 @@ create table t1 as select upper(1) as c1;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(1) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(1) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 as select repeat(' ', 64) as a limit 0;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(64) CHARACTER SET utf8 NOT NULL
+ `a` varchar(64) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ("1.1"), ("2.1");
select a, hex(a) from t1;
@@ -4528,7 +4543,9 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -4548,7 +4565,7 @@ create table t2 as select concat(a) from t1;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `concat(a)` varchar(19) CHARACTER SET utf8 NOT NULL
+ `concat(a)` varchar(19) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
create table t1 (a date);
@@ -4840,14 +4857,16 @@ hex(a)
drop table t1;
drop view v1;
create table t1 (a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
create view v1(a) as select concat(a) from t1;
show columns from v1;
Field Type Null Key Default Extra
-a varchar(19) NO
+a varchar(19) YES NULL
select hex(a) from v1;
hex(a)
303030302D30302D30302030303A30303A3030
@@ -5098,14 +5117,14 @@ CREATE TABLE t2 AS SELECT CONCAT_WS(1,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET utf8 NOT NULL
+ `CONCAT_WS(1,2,3)` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT INSERT(1133,3,0,22) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET utf8 NOT NULL
+ `INSERT(1133,3,0,22)` varchar(6) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LCASE(a) FROM t1;
@@ -5126,35 +5145,35 @@ CREATE TABLE t2 AS SELECT REPEAT(1,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPEAT(1,2)` varchar(2) CHARACTER SET utf8 NOT NULL
+ `REPEAT(1,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LEFT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LEFT(123,2)` varchar(2) CHARACTER SET utf8 NOT NULL
+ `LEFT(123,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RIGHT(123,2) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RIGHT(123,2)` varchar(2) CHARACTER SET utf8 NOT NULL
+ `RIGHT(123,2)` varchar(2) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT LTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `LTRIM(123)` varchar(3) CHARACTER SET utf8 NOT NULL
+ `LTRIM(123)` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT RTRIM(123) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `RTRIM(123)` varchar(3) CHARACTER SET utf8 NOT NULL
+ `RTRIM(123)` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT ELT(1,111,222,333) FROM t1;
@@ -5168,35 +5187,35 @@ CREATE TABLE t2 AS SELECT REPLACE(111,2,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `REPLACE(111,2,3)` varchar(3) CHARACTER SET utf8 NOT NULL
+ `REPLACE(111,2,3)` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SUBSTRING_INDEX(111,111,1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET utf8 NOT NULL
+ `SUBSTRING_INDEX(111,111,1)` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT MAKE_SET(111,222,3) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET utf8 NOT NULL
+ `MAKE_SET(111,222,3)` varchar(5) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT SOUNDEX(1) FROM t1;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `SOUNDEX(1)` varchar(4) CHARACTER SET utf8 NOT NULL
+ `SOUNDEX(1)` varchar(4) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
CREATE TABLE t2 AS SELECT EXPORT_SET(1,'Y','N','',8);
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET utf8 NOT NULL
+ `EXPORT_SET(1,'Y','N','',8)` varchar(64) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
DROP TABLE t1;
@@ -5404,6 +5423,7 @@ Note 1003 select 'abcdÁÂÃÄÅ' AS `abcdÁÂÃÄÅ`,_latin1'abcd\xC3\x81\xC3\x
# Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
#
SET NAMES utf8;
+SET group_concat_max_len = 1024;
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
@@ -5411,13 +5431,18 @@ SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1
GROUP BY id
ORDER BY l DESC;
id l
-a 1401
+a 1024
+Warnings:
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
SELECT id, CHAR_LENGTH(GROUP_CONCAT(body)) AS l
FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1;
id l
-a 1401
+a 1024
+Warnings:
+Warning 1260 Row 2 was cut by GROUP_CONCAT()
+SET group_concat_max_len = DEFAULT;
#
# MDEV-7814 Assertion `args[0]->fixed' fails in Item_func_conv_charset::Item_func_conv_charset
#
@@ -5440,7 +5465,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -5528,7 +5553,7 @@ aր
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
@@ -5555,7 +5580,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
@@ -5588,7 +5613,7 @@ z
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
@@ -5599,7 +5624,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
@@ -5684,7 +5709,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -5772,7 +5797,7 @@ aր
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆' ORDER BY ch;
@@ -5799,7 +5824,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch<'a𝌆b' ORDER BY ch;
@@ -5832,7 +5857,7 @@ z
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆' ORDER BY ch;
@@ -5843,7 +5868,7 @@ Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86' for column 'ch' at row 1
EXPLAIN
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 index ch ch 182 NULL # Using where; Using index
+1 SIMPLE t1 index ch ch 183 NULL # Using where; Using index
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x8C\x86b' for column 'ch' at row 1
SELECT ch FROM t1 FORCE KEY (ch) WHERE ch>'a𝌆b' ORDER BY ch;
@@ -5928,7 +5953,7 @@ ADD KEY(ch);
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `ch` varchar(60) CHARACTER SET utf8 NOT NULL,
+ `ch` varchar(60) CHARACTER SET utf8 DEFAULT NULL,
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
PRIMARY KEY (`id`),
KEY `ch` (`ch`)
@@ -6197,9 +6222,11 @@ INSERT INTO t1 VALUES (REPEAT('',100));
SELECT OCTET_LENGTH(a) FROM t1;
OCTET_LENGTH(a)
300
+set sql_mode='NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
+set sql_mode=default;
SELECT OCTET_LENGTH(a),a FROM t1;
OCTET_LENGTH(a) a
255 
@@ -6248,6 +6275,7 @@ len
#
CREATE TABLE t1 (i INT, KEY(i));
INSERT INTO t1 VALUES (20081205),(20050327);
+SET sql_mode='';
SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
HEX(i) HEX(CHAR(i USING utf8))
131F197 0131
@@ -6306,7 +6334,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf8 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -6550,7 +6578,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `a` varchar(5) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -6802,7 +6830,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -6825,7 +6853,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -6848,7 +6876,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -6871,7 +6899,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -6897,7 +6925,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -6923,7 +6951,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE CONCAT(c1)='a';
@@ -6946,7 +6974,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT * FROM t1 WHERE 'a'=CONCAT(c1);
@@ -6969,7 +6997,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '% '=CONCAT(c1);
@@ -6992,7 +7020,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a', 10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('%'),('% ');
SELECT * FROM t1 WHERE '%'=CONCAT(c1);
@@ -7018,7 +7046,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('a'),('a ');
SELECT a, LENGTH(a) FROM t1 WHERE a NOT LIKE 'a ';
@@ -7043,7 +7071,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',10) AS c1 LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `c1` varchar(10) CHARACTER SET utf8 NOT NULL
+ `c1` varchar(10) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('ae'),('À');
SELECT * FROM t1 WHERE c1='À';
@@ -7174,6 +7202,7 @@ SELECT _utf8 0x7E, _utf8 X'7E', _utf8 B'01111110';
_utf8 0x7E _utf8 X'7E' _utf8 B'01111110'
~ ~ ~
# Start of ctype_unescape.inc
+SET sql_mode = '';
SET @query=_binary'SELECT CHARSET(\'test\'),@@character_set_client,@@character_set_connection';
PREPARE stmt FROM @query;
EXECUTE stmt;
@@ -10236,6 +10265,7 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
# End of ctype_backslash.inc
#
# End of 10.0 tests
@@ -10499,7 +10529,7 @@ DROP TABLE t1;
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
-LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES;
+LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8 IGNORE 4 LINES;
Warnings:
Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3
@@ -10521,7 +10551,7 @@ DROP TABLE t1;
# MDEV-9874 LOAD XML INFILE does not handle well broken multi-byte characters
#
CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
-LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY '<row>';
+LOAD XML INFILE '../../std_data/loaddata/mdev9874.xml' IGNORE INTO TABLE t1 CHARACTER SET utf8 ROWS IDENTIFIED BY '<row>';
Warnings:
Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
SELECT HEX(a) FROM t1;
diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result
index 23e6f0aec26..3ec586d2fba 100644
--- a/mysql-test/r/ctype_utf8mb4.result
+++ b/mysql-test/r/ctype_utf8mb4.result
@@ -156,6 +156,7 @@ F0CEC4 ПМЎ
drop table t1;
set LC_TIME_NAMES='en_US';
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8mb4);
insert into t1 values (_koi8r'ÁÂ');
Warnings:
@@ -219,6 +220,8 @@ length(s1) char_length(s1)
65535 43690
65534 32767
drop table t1;
+set sql_mode = default;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8mb4);
insert into t1 values (0x41FF);
Warnings:
@@ -243,6 +246,7 @@ select hex(s1) from t1;
hex(s1)
413F
drop table t1;
+set sql_mode = default;
create table t1 (a text character set utf8mb4, primary key(a(371)));
ERROR 42000: Specified key was too long; max key length is 1000 bytes
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4;
@@ -901,8 +905,8 @@ create table t2 select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4'')as b from
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL,
- `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
@@ -1126,7 +1130,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -1233,7 +1237,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+ `a` varchar(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_utf8mb4 0xEFBE9D),(_utf8mb4 0xF0908E84);
INSERT INTO t1 VALUES (_utf8mb4 0xCE85),(_utf8mb4 0xF4808080);
@@ -1373,6 +1377,7 @@ ERROR 42000: Invalid default value for 'x'
create table t1 (x enum('A', 'B') default 0) character set utf8mb4;
ERROR 42000: Invalid default value for 'x'
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
@@ -1406,12 +1411,15 @@ content msisdn
ERR ИЌрО.АфОЌОЌ.АеОЌОЌрОЌЎЌрОЌрЌрОрПр ОЌрОЌрОЌрОЌр ОЌрОЎЌ ОрбЎМрОЌрфЌрОрОрОЌрфЌфЌОЌ.АЎ.Д ОЌЎОЌрОЌраЎ.АЎОЌрОЌрОЌрЌЎОрОЌрОЌрОЌр ÐŒ.ДаЎОЌфшьЌрОЌЎ ОЌ.АЎОЌОЌрМ ОЌаЎЌО 1234567890
11 g 1234567890
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a char(20) character set utf8mb4);
insert into t1 values ('123456'),('аМЎрей');
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8mb4;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
+set sql_mode = default;
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
@@ -1881,6 +1889,7 @@ aa
xxx
yyy
DROP TABLE t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8mb4;
@@ -1924,6 +1933,7 @@ select length(a) from t1;
length(a)
3000
drop table t1;
+set sql_mode = default;
set names utf8mb4;
select hex(char(1 using utf8mb4));
hex(char(1 using utf8mb4))
@@ -1939,12 +1949,12 @@ char(53647 using utf8mb4)
я
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-??
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -2153,12 +2163,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8mb4));
hex(char(0xFF using utf8mb4))
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-3F
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2321,6 +2331,8 @@ Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert into t1 values (0xF08F8080);
+ERROR 22007: Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF08F8080);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2341,6 +2353,8 @@ Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert into t1 values (0xF4908080);
+ERROR 22007: Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF4908080);
Warnings:
Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2418,7 +2432,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'),
(917999, x'f3a087af');
INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480');
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
Warnings:
Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
@@ -2434,7 +2448,7 @@ u_decimal hex(utf8mb4_encoding)
1114111 F48FBFBF
119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480
119070 F09D849EF09D859EF09D859EF09D8480F09D859FF09D859FF09D859FF09D85A0F09D85A0F09D8480
-INSERT INTO t1 VALUES (1114111, x'f5808080');
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2448,7 +2462,7 @@ utf8mb3_encoding VARCHAR(10) NOT NULL
) CHARACTER SET utf8mb3;
INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
-INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2456,6 +2470,8 @@ table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -2515,6 +2531,7 @@ SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
count(*)
33
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x80' for column 'utf8mb4_encoding' at row 1
@@ -2528,6 +2545,7 @@ Warning 1366 Incorrect string value: '\xF3\xA0\x87\xAF' for column 'utf8mb4_enco
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 9
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 10
Warning 1366 Incorrect string value: '\xF0\x9D\x84\x9E\xF0\x9D...' for column 'utf8mb4_encoding' at row 11
+set sql_mode = default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2667,7 +2685,7 @@ Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
`utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
`utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL,
- `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL
+ `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TEMPORARY TABLE t3;
SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3;
@@ -2700,12 +2718,14 @@ subject varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci,
p VARCHAR(15) CHARACTER SET utf8
) DEFAULT CHARSET=latin1;
ALTER TABLE t1 ADD INDEX (subject);
+SET sql_mode= 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1
DEFAULT CHARACTER SET utf8,
MODIFY subject varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci,
MODIFY p varchar(255) CHARACTER SET utf8;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2817,9 +2837,11 @@ INSERT INTO t1 VALUES (REPEAT('😎',100));
SELECT OCTET_LENGTH(a) FROM t1;
OCTET_LENGTH(a)
400
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
+SET sql_mode = DEFAULT;
SELECT OCTET_LENGTH(a),a FROM t1;
OCTET_LENGTH(a) a
252 😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎😎
@@ -2892,7 +2914,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3136,7 +3158,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',5) AS a;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
CREATE TABLE t2 AS SELECT WEIGHT_STRING(a) AS ws FROM t1;
SHOW CREATE TABLE t2;
@@ -3394,6 +3416,8 @@ a VARCHAR(32) CHARACTER SET utf8mb4,
b VARCHAR(32) CHARACTER SET utf8
);
INSERT INTO t1 SELECT 'a 😁 b', 'a 😁 b';
+ERROR 22007: Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'a' at row 1
+INSERT IGNORE INTO t1 SELECT 'a 😁 b', 'a 😁 b';
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'a' at row 1
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1
@@ -3414,6 +3438,8 @@ a VARCHAR(32) CHARACTER SET utf8mb4,
b VARCHAR(32) CHARACTER SET utf8
);
INSERT INTO t1 SELECT 'a 😁 b', 'a 😁 b';
+ERROR 22007: Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1
+INSERT IGNORE INTO t1 SELECT 'a 😁 b', 'a 😁 b';
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x98\x81 b' for column 'b' at row 1
SELECT * FROM t1;
@@ -3456,7 +3482,7 @@ DROP FUNCTION f1;
# MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
#
CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4);
-LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES;
+LOAD DATA INFILE '../../std_data/loaddata/mdev9823.utf8mb4.txt' IGNORE INTO TABLE t1 CHARACTER SET utf8mb4 IGNORE 4 LINES;
Warnings:
Warning 1366 Incorrect string value: '\xD0' for column 'a' at row 1
Warning 1366 Incorrect string value: '\xE1\x80' for column 'a' at row 3
diff --git a/mysql-test/r/ctype_utf8mb4_heap.result b/mysql-test/r/ctype_utf8mb4_heap.result
index d70e009228e..58e9e93bb13 100644
--- a/mysql-test/r/ctype_utf8mb4_heap.result
+++ b/mysql-test/r/ctype_utf8mb4_heap.result
@@ -156,6 +156,7 @@ F0CFCEC5C4C5CCD8CEC9CB ППМеЎельМОк
drop table t1;
set LC_TIME_NAMES='en_US';
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8mb4) engine heap;
insert into t1 values (_koi8r'ÁÂ');
Warnings:
@@ -219,6 +220,8 @@ length(s1) char_length(s1)
510 255
510 255
drop table t1;
+set sql_mode = default;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8mb4) engine heap;
insert into t1 values (0x41FF);
Warnings:
@@ -235,6 +238,7 @@ select hex(s1) from t1;
hex(s1)
413F
drop table t1;
+set sql_mode = default;
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE heap;
INSERT INTO t1 VALUES ( 'test' );
SELECT a.a, b.a FROM t1 a, t1 b WHERE a.a = b.a;
@@ -840,8 +844,8 @@ create table t2 engine heap select concat(a,_utf8mb4'') as a, concat(b,_utf8mb4'
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL,
- `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
@@ -1065,7 +1069,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -1272,6 +1276,7 @@ ERROR 42000: Invalid default value for 'x'
create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine heap;
ERROR 42000: Invalid default value for 'x'
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
@@ -1305,12 +1310,15 @@ content msisdn
ERR ИЌрО.АфОЌОЌ.АеОЌОЌрОЌЎЌрОЌрЌрОрПр ОЌрОЌрОЌрОЌр ОЌрОЎЌ ОрбЎМрОЌрфЌрОрОрОЌрфЌфЌОЌ.АЎ.Д ОЌЎОЌрОЌраЎ.АЎОЌрОЌрОЌрЌЎОрОЌрОЌрОЌр ÐŒ.ДаЎОЌфшьЌрОЌЎ ОЌ.АЎОЌОЌрМ ОЌаЎЌО 1234567890
11 g 1234567890
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a char(20) character set utf8mb4) engine heap;
insert into t1 values ('123456'),('аМЎрей');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8mb4;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
+SET sql_mode = DEFAULT;
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
@@ -1713,6 +1721,7 @@ aa
xxx
yyy
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8mb4 ENGINE heap;
@@ -1756,6 +1765,7 @@ select length(a) from t1;
length(a)
3000
drop table t1;
+SET sql_mode = DEFAULT;
set names utf8mb4;
select hex(char(1 using utf8mb4));
hex(char(1 using utf8mb4))
@@ -1771,12 +1781,12 @@ char(53647 using utf8mb4)
я
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-??
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -1985,12 +1995,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8mb4));
hex(char(0xFF using utf8mb4))
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-3F
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2153,6 +2163,8 @@ Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert into t1 values (0xF08F8080);
+ERROR 22007: Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF08F8080);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2173,6 +2185,8 @@ Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert into t1 values (0xF4908080);
+ERROR 22007: Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF4908080);
Warnings:
Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2231,7 +2245,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'),
(917999, x'f3a087af');
INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480');
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
Warnings:
Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
@@ -2248,6 +2262,8 @@ u_decimal hex(utf8mb4_encoding)
65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB
917999 F3A087AF
INSERT INTO t1 VALUES (1114111, x'f5808080');
+ERROR 22007: Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2262,6 +2278,8 @@ utf8mb3_encoding VARCHAR(10) NOT NULL
INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2269,6 +2287,8 @@ table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -2328,7 +2348,9 @@ SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
count(*)
33
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+set sql_mode = default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2468,7 +2490,7 @@ Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
`utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
`utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL,
- `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL
+ `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
DROP TEMPORARY TABLE t3;
SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3;
diff --git a/mysql-test/r/ctype_utf8mb4_innodb.result b/mysql-test/r/ctype_utf8mb4_innodb.result
index 28b566c19eb..045723960e6 100644
--- a/mysql-test/r/ctype_utf8mb4_innodb.result
+++ b/mysql-test/r/ctype_utf8mb4_innodb.result
@@ -156,6 +156,7 @@ F0CFCEC5C4C5CCD8CEC9CB ППМеЎельМОк
drop table t1;
set LC_TIME_NAMES='en_US';
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8mb4) engine InnoDB;
insert into t1 values (_koi8r'ÁÂ');
Warnings:
@@ -219,6 +220,8 @@ length(s1) char_length(s1)
65535 43690
65535 65535
drop table t1;
+set sql_mode = default;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8mb4) engine InnoDB;
insert into t1 values (0x41FF);
Warnings:
@@ -243,6 +246,7 @@ select hex(s1) from t1;
hex(s1)
413F
drop table t1;
+set sql_mode = default;
create table t1 (a text character set utf8mb4, primary key(a(371))) engine InnoDB;
ERROR 42000: Specified key was too long; max key length is 767 bytes
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE InnoDB;
@@ -901,8 +905,8 @@ create table t2 engine InnoDB select concat(a,_utf8mb4'') as a, concat(b,_utf8mb
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL,
- `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
@@ -1126,7 +1130,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -1333,6 +1337,7 @@ ERROR 42000: Invalid default value for 'x'
create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine InnoDB;
ERROR 42000: Invalid default value for 'x'
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
@@ -1366,12 +1371,15 @@ content msisdn
ERR ИЌрО.АфОЌОЌ.АеОЌОЌрОЌЎЌрОЌрЌрОрПр ОЌрОЌрОЌрОЌр ОЌрОЎЌ ОрбЎМрОЌрфЌрОрОрОЌрфЌфЌОЌ.АЎ.Д ОЌЎОЌрОЌраЎ.АЎОЌрОЌрОЌрЌЎОрОЌрОЌрОЌр ÐŒ.ДаЎОЌфшьЌрОЌЎ ОЌ.АЎОЌОЌрМ ОЌаЎЌО 1234567890
11 g 1234567890
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a char(20) character set utf8mb4) engine InnoDB;
insert into t1 values ('123456'),('аМЎрей');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8mb4;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
+SET sql_mode = DEFAULT;
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
@@ -1841,6 +1849,7 @@ aa
xxx
yyy
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8mb4 ENGINE InnoDB;
@@ -1884,6 +1893,7 @@ select length(a) from t1;
length(a)
3000
drop table t1;
+SET sql_mode = DEFAULT;
set names utf8mb4;
select hex(char(1 using utf8mb4));
hex(char(1 using utf8mb4))
@@ -1899,12 +1909,12 @@ char(53647 using utf8mb4)
я
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-??
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -2113,12 +2123,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8mb4));
hex(char(0xFF using utf8mb4))
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-3F
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2281,6 +2291,8 @@ Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert into t1 values (0xF08F8080);
+ERROR 22007: Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF08F8080);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2301,6 +2313,8 @@ Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert into t1 values (0xF4908080);
+ERROR 22007: Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF4908080);
Warnings:
Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2378,7 +2392,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'),
(917999, x'f3a087af');
INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480');
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
Warnings:
Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
@@ -2395,6 +2409,8 @@ u_decimal hex(utf8mb4_encoding)
65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB
917999 F3A087AF
INSERT INTO t1 VALUES (1114111, x'f5808080');
+ERROR 22007: Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2409,6 +2425,8 @@ utf8mb3_encoding VARCHAR(10) NOT NULL
INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2416,6 +2434,8 @@ table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -2475,7 +2495,9 @@ SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
count(*)
33
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+set sql_mode = default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2615,7 +2637,7 @@ Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
`utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
`utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL,
- `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL
+ `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TEMPORARY TABLE t3;
SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3;
diff --git a/mysql-test/r/ctype_utf8mb4_myisam.result b/mysql-test/r/ctype_utf8mb4_myisam.result
index 34145417966..fc8a1996d67 100644
--- a/mysql-test/r/ctype_utf8mb4_myisam.result
+++ b/mysql-test/r/ctype_utf8mb4_myisam.result
@@ -156,6 +156,7 @@ F0CFCEC5C4C5CCD8CEC9CB ППМеЎельМОк
drop table t1;
set LC_TIME_NAMES='en_US';
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8mb4) engine MyISAM;
insert into t1 values (_koi8r'ÁÂ');
Warnings:
@@ -219,6 +220,8 @@ length(s1) char_length(s1)
65535 43690
65535 65535
drop table t1;
+set sql_mode = default;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8mb4) engine MyISAM;
insert into t1 values (0x41FF);
Warnings:
@@ -243,6 +246,7 @@ select hex(s1) from t1;
hex(s1)
413F
drop table t1;
+set sql_mode = default;
create table t1 (a text character set utf8mb4, primary key(a(371))) engine MyISAM;
ERROR 42000: Specified key was too long; max key length is 1000 bytes
CREATE TABLE t1 ( a varchar(10) ) CHARACTER SET utf8mb4 ENGINE MyISAM;
@@ -901,8 +905,8 @@ create table t2 engine MyISAM select concat(a,_utf8mb4'') as a, concat(b,_utf8mb
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
- `a` varchar(5) CHARACTER SET utf8mb4 NOT NULL,
- `b` varchar(15) CHARACTER SET utf8mb4 NOT NULL
+ `a` varchar(5) CHARACTER SET utf8mb4 DEFAULT NULL,
+ `b` varchar(15) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t2;
drop table t1;
@@ -1126,7 +1130,7 @@ CREATE TABLE t1 AS SELECT REPEAT('a',1) AS a, 1 AS b LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(1) CHARACTER SET utf8mb4 NOT NULL,
+ `a` varchar(1) CHARACTER SET utf8mb4 DEFAULT NULL,
`b` int(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('s',0),(_latin1 0xDF,1);
@@ -1333,6 +1337,7 @@ ERROR 42000: Invalid default value for 'x'
create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine MyISAM;
ERROR 42000: Invalid default value for 'x'
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
`country` varchar(100) NOT NULL default '',
@@ -1366,12 +1371,15 @@ content msisdn
ERR ИЌрО.АфОЌОЌ.АеОЌОЌрОЌЎЌрОЌрЌрОрПр ОЌрОЌрОЌрОЌр ОЌрОЎЌ ОрбЎМрОЌрфЌрОрОрОЌрфЌфЌОЌ.АЎ.Д ОЌЎОЌрОЌраЎ.АЎОЌрОЌрОЌрЌЎОрОЌрОЌрОЌр ÐŒ.ДаЎОЌфшьЌрОЌЎ ОЌ.АЎОЌОЌрМ ОЌаЎЌО 1234567890
11 g 1234567890
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a char(20) character set utf8mb4) engine MyISAM;
insert into t1 values ('123456'),('аМЎрей');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8mb4;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
+SET sql_mode = DEFAULT;
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
@@ -1841,6 +1849,7 @@ aa
xxx
yyy
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8mb4 ENGINE MyISAM;
@@ -1884,6 +1893,7 @@ select length(a) from t1;
length(a)
3000
drop table t1;
+SET sql_mode = DEFAULT;
set names utf8mb4;
select hex(char(1 using utf8mb4));
hex(char(1 using utf8mb4))
@@ -1899,12 +1909,12 @@ char(53647 using utf8mb4)
я
select char(0xff,0x8f using utf8mb4);
char(0xff,0x8f using utf8mb4)
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF8F'
select convert(char(0xff,0x8f) using utf8mb4);
convert(char(0xff,0x8f) using utf8mb4)
-??
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF\x8F'
set sql_mode=traditional;
@@ -2113,12 +2123,12 @@ ERROR HY000: Invalid utf8mb4 character string: 'FF'
set sql_mode=default;
select hex(char(0xFF using utf8mb4));
hex(char(0xFF using utf8mb4))
-
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: 'FF'
select hex(convert(0xFF using utf8mb4));
hex(convert(0xFF using utf8mb4))
-3F
+NULL
Warnings:
Warning 1300 Invalid utf8mb4 character string: '\xFF'
select hex(_utf8mb4 0x616263FF);
@@ -2281,6 +2291,8 @@ Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
insert into t1 values (0xF08F8080);
+ERROR 22007: Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF08F8080);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x8F\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2301,6 +2313,8 @@ Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
insert into t1 values (0xF4908080);
+ERROR 22007: Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
+insert ignore into t1 values (0xF4908080);
Warnings:
Warning 1366 Incorrect string value: '\xF4\x90\x80\x80' for column 'utf8mb4' at row 1
select hex(utf8mb4) from t1;
@@ -2378,7 +2392,7 @@ INSERT INTO t1 VALUES (119040, x'f09d8480'),
(917999, x'f3a087af');
INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480');
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
Warnings:
Warning 1265 Data truncated for column 'utf8mb4_encoding' at row 1
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
@@ -2395,6 +2409,8 @@ u_decimal hex(utf8mb4_encoding)
65131 EFB9ABF09D849EF09D859EF09D859EF09D8480F09D859FEFB9ABEFB9ABF09D85A0EFB9AB
917999 F3A087AF
INSERT INTO t1 VALUES (1114111, x'f5808080');
+ERROR 22007: Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x80\x80' for column 'utf8mb4_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2409,6 +2425,8 @@ utf8mb3_encoding VARCHAR(10) NOT NULL
INSERT INTO t2 VALUES (42856, x'ea9da8');
INSERT INTO t2 VALUES (65131, x'efb9ab');
INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBF' for column 'utf8mb3_encoding' at row 1
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -2416,6 +2434,8 @@ table_name= 't2' AND column_name= 'utf8mb3_encoding';
character_maximum_length character_octet_length
10 30
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+ERROR 22007: Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
Warnings:
Warning 1366 Incorrect string value: '\xF4\x8F\xBF\xBD' for column 'utf8mb3_encoding' at row 1
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -2475,7 +2495,9 @@ SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
count(*)
33
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+set sql_mode = default;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2615,7 +2637,7 @@ Table Create Table
t3 CREATE TEMPORARY TABLE `t3` (
`utf8mb4` varchar(10) CHARACTER SET utf8mb4 NOT NULL,
`utf8mb3` varchar(10) CHARACTER SET utf8 NOT NULL,
- `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 NOT NULL
+ `concat(utf8mb4,utf8mb3)` varchar(20) CHARACTER SET utf8mb4 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TEMPORARY TABLE t3;
SELECT * FROM t1, t2 WHERE t1.utf8mb4 > t2.utf8mb3;
diff --git a/mysql-test/r/ctype_utf8mb4_uca.result b/mysql-test/r/ctype_utf8mb4_uca.result
index c03aaef387a..ca7f1a3d7d4 100644
--- a/mysql-test/r/ctype_utf8mb4_uca.result
+++ b/mysql-test/r/ctype_utf8mb4_uca.result
@@ -2752,7 +2752,7 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`id` int(11) NOT NULL AUTO_INCREMENT,
- `s1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci NOT NULL,
+ `s1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_myanmar_ci DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 (s1) VALUES
@@ -5338,7 +5338,7 @@ CREATE TABLE t1 AS SELECT SPACE(3) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL
+ `a` varchar(3) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (SPACE(0)),(SPACE(1)),(SPACE(2));
SELECT HEX(a), HEX(WEIGHT_STRING(a AS CHAR(8))) FROM t1;
@@ -5371,7 +5371,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES (_ucs2 0x3400);
INSERT INTO t1 VALUES (_ucs2 0xF001);
@@ -5384,7 +5384,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('A'),('À'),('Á'),('Â'),('Ã'),('Ä'),('Å');
SELECT a, HEX(WEIGHT_STRING(a LEVEL 2)) FROM t1 ORDER BY a;
@@ -5443,7 +5443,7 @@ CREATE TABLE t1 AS SELECT SPACE(10) AS a LIMIT 0;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 NOT NULL
+ `a` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_thai_520_w2 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
INSERT INTO t1 VALUES ('cota'),('cote'),('cotz');
INSERT INTO t1 VALUES ('coté'),('cÎte'),('cÎté'),('cotë'),('cÎtë');
diff --git a/mysql-test/r/date_formats.result b/mysql-test/r/date_formats.result
index 8439c40fbf9..23b7539a4f3 100644
--- a/mysql-test/r/date_formats.result
+++ b/mysql-test/r/date_formats.result
@@ -69,12 +69,12 @@ date format str_to_date
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12.000000
-10:20:10 %H:%i:%s 0000-00-00 10:20:10.000000
-10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10.000000
-10:20:10 %T 0000-00-00 10:20:10.000000
-10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10.000000
-10:20:10AM %r 0000-00-00 10:20:10.000000
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58.000000
15 September 2001 %d %M %Y 2001-09-15 00:00:00.000000
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00.000000
@@ -91,6 +91,13 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00.000000
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00.000000
15-01-20 %d-%m-%y 2020-01-15 00:00:00.000000
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00.000000
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select date,format,concat('',str_to_date(date, format)) as con from t1;
date format con
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12.000000
@@ -102,12 +109,12 @@ date format con
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12.000000
-10:20:10 %H:%i:%s 0000-00-00 10:20:10.000000
-10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10.000000
-10:20:10 %T 0000-00-00 10:20:10.000000
-10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10.000000
-10:20:10AM %r 0000-00-00 10:20:10.000000
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58.000000
15 September 2001 %d %M %Y 2001-09-15 00:00:00.000000
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00.000000
@@ -124,6 +131,13 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00.000000
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00.000000
15-01-20 %d-%m-%y 2020-01-15 00:00:00.000000
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00.000000
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select date,format,cast(str_to_date(date, format) as datetime) as datetime from t1;
date format datetime
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02 10:11:12
@@ -135,12 +149,12 @@ date format datetime
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02 02:11:12
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02 00:11:12
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02 23:11:12
-10:20:10 %H:%i:%s 0000-00-00 10:20:10
-10:20:10 %h:%i:%s.%f 0000-00-00 10:20:10
-10:20:10 %T 0000-00-00 10:20:10
-10:20:10AM %h:%i:%s%p 0000-00-00 10:20:10
-10:20:10AM %r 0000-00-00 10:20:10
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00 10:20:10
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15 12:59:58
15 September 2001 %d %M %Y 2001-09-15 00:00:00
15 SEPTEMB 2001 %d %M %Y 2001-09-15 00:00:00
@@ -157,6 +171,13 @@ Tuesday 52 2001 %W %V %X 2002-01-01 00:00:00
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15 00:00:00
15-01-20 %d-%m-%y 2020-01-15 00:00:00
15-2001-1 %d-%Y-%c 2001-01-15 00:00:00
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select date,format,DATE(str_to_date(date, format)) as date2 from t1;
date format date2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 2003-01-02
@@ -168,12 +189,12 @@ date format date2
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 2003-01-02
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 2003-01-02
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 2003-01-02
-10:20:10 %H:%i:%s 0000-00-00
-10:20:10 %h:%i:%s.%f 0000-00-00
-10:20:10 %T 0000-00-00
-10:20:10AM %h:%i:%s%p 0000-00-00
-10:20:10AM %r 0000-00-00
-10:20:10.44AM %h:%i:%s.%f%p 0000-00-00
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 2001-01-15
15 September 2001 %d %M %Y 2001-09-15
15 SEPTEMB 2001 %d %M %Y 2001-09-15
@@ -190,6 +211,13 @@ Tuesday 52 2001 %W %V %X 2002-01-01
15-01-2001 %d-%m-%Y %H:%i:%S 2001-01-15
15-01-20 %d-%m-%y 2020-01-15
15-2001-1 %d-%Y-%c 2001-01-15
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select date,format,TIME(str_to_date(date, format)) as time from t1;
date format time
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12.000000
@@ -201,12 +229,12 @@ date format time
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12.000000
-10:20:10 %H:%i:%s 10:20:10.000000
-10:20:10 %h:%i:%s.%f 10:20:10.000000
-10:20:10 %T 10:20:10.000000
-10:20:10AM %h:%i:%s%p 10:20:10.000000
-10:20:10AM %r 10:20:10.000000
-10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58.000000
15 September 2001 %d %M %Y 00:00:00.000000
15 SEPTEMB 2001 %d %M %Y 00:00:00.000000
@@ -223,6 +251,13 @@ Tuesday 52 2001 %W %V %X 00:00:00.000000
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00.000000
15-01-20 %d-%m-%y 00:00:00.000000
15-2001-1 %d-%Y-%c 00:00:00.000000
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select date,format,concat(TIME(str_to_date(date, format))) as time2 from t1;
date format time2
2003-01-02 10:11:12 %Y-%m-%d %H:%i:%S 10:11:12.000000
@@ -234,12 +269,12 @@ date format time2
2003-01-02 02:11:12.12345AM %Y-%m-%d %h:%i:%S.%f %p 02:11:12.123450
2003-01-02 12:11:12.12345 am %Y-%m-%d %h:%i:%S.%f%p 00:11:12.123450
2003-01-02 11:11:12Pm %Y-%m-%d %h:%i:%S%p 23:11:12.000000
-10:20:10 %H:%i:%s 10:20:10.000000
-10:20:10 %h:%i:%s.%f 10:20:10.000000
-10:20:10 %T 10:20:10.000000
-10:20:10AM %h:%i:%s%p 10:20:10.000000
-10:20:10AM %r 10:20:10.000000
-10:20:10.44AM %h:%i:%s.%f%p 10:20:10.440000
+10:20:10 %H:%i:%s NULL
+10:20:10 %h:%i:%s.%f NULL
+10:20:10 %T NULL
+10:20:10AM %h:%i:%s%p NULL
+10:20:10AM %r NULL
+10:20:10.44AM %h:%i:%s.%f%p NULL
15-01-2001 12:59:58 %d-%m-%Y %H:%i:%S 12:59:58.000000
15 September 2001 %d %M %Y 00:00:00.000000
15 SEPTEMB 2001 %d %M %Y 00:00:00.000000
@@ -256,6 +291,13 @@ Tuesday 52 2001 %W %V %X 00:00:00.000000
15-01-2001 %d-%m-%Y %H:%i:%S 00:00:00.000000
15-01-20 %d-%m-%y 00:00:00.000000
15-2001-1 %d-%Y-%c 00:00:00.000000
+Warnings:
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
+Warning 1411 Incorrect datetime value: '10:20:10.44AM' for function str_to_date
select concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'));
concat('',str_to_date('8:11:2.123456 03-01-02','%H:%i:%S.%f %y-%m-%d'))
2003-01-02 08:11:02.123456
@@ -352,18 +394,18 @@ insert into t1 values
('03-01-02 10:11:12 PM', '%Y-%m-%d %h:%i:%S %p');
select date,format,str_to_date(date, format) as str_to_date from t1;
date format str_to_date
-10:20:10AM %h:%i:%s 0000-00-00 10:20:10.000000
+10:20:10AM %h:%i:%s NULL
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12.000000
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000
Warnings:
-Warning 1292 Truncated incorrect datetime value: '10:20:10AM'
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
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.000000
+10:20:10AM %h:%i:%s NULL
2003-01-02 10:11:12 %Y-%m-%d %h:%i:%S 2003-01-02 10:11:12.000000
03-01-02 10:11:12 PM %Y-%m-%d %h:%i:%S %p 2003-01-02 22:11:12.000000
Warnings:
-Warning 1292 Truncated incorrect datetime value: '10:20:10AM'
+Warning 1411 Incorrect datetime value: '10:20:10AM' for function str_to_date
drop table t1;
select get_format(DATE, 'USA') as a;
a
@@ -404,6 +446,13 @@ create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%
str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2,
str_to_date("2003-01-02", "%Y-%m-%d") as f3,
str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5;
+ERROR HY000: Incorrect datetime value: '02' for function str_to_date
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
+create table t1 select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1,
+str_to_date("10:11:12.0012", "%H:%i:%S.%f") as f2,
+str_to_date("2003-01-02", "%Y-%m-%d") as f3,
+str_to_date("02", "%d") as f4, str_to_date("02 10", "%d %H") as f5;
+set sql_mode = DEFAULT;
describe t1;
Field Type Null Key Default Extra
f1 datetime(6) YES NULL
@@ -418,8 +467,14 @@ drop table t1;
create table t1 select "02 10" as a, "%d %H" as b;
select str_to_date(a,b) from t1;
str_to_date(a,b)
-0000-00-02 10:00:00.000000
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '02 10' for function str_to_date
+create table t2 select str_to_date(a,b) from t1;
+ERROR HY000: Incorrect datetime value: '02 10' for function str_to_date
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select str_to_date(a,b) from t1;
+set sql_mode = DEFAULT;
describe t2;
Field Type Null Key Default Extra
str_to_date(a,b) datetime(6) YES NULL
diff --git a/mysql-test/r/datetime_456.result b/mysql-test/r/datetime_456.result
index 44351a821bc..63d18a34765 100644
--- a/mysql-test/r/datetime_456.result
+++ b/mysql-test/r/datetime_456.result
@@ -1,6 +1,8 @@
create table t1 (d datetime);
insert t1 values (addtime('9999-12-31 23:59:59', '00:00:01')),
(from_days(3652499));
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 2
select * from t1;
d
NULL
diff --git a/mysql-test/r/default.result b/mysql-test/r/default.result
index ac449d44fee..59e16189a58 100644
--- a/mysql-test/r/default.result
+++ b/mysql-test/r/default.result
@@ -106,30 +106,40 @@ a b c d e f g h i j k l m n o p q r s t u v w x y z a1 b1
1 0000 NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
drop table t1;
drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table bug20691 (i int, d datetime NOT NULL, dn datetime not null default '0000-00-00 00:00:00');
-insert into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT);
+SET sql_mode = DEFAULT;
+insert ignore into bug20691 values (1, DEFAULT, DEFAULT), (1, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (1, DEFAULT, DEFAULT);
Warnings:
Warning 1364 Field 'd' doesn't have a default value
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
Warning 1364 Field 'd' doesn't have a default value
-insert into bug20691 (i) values (2);
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
+insert ignore into bug20691 (i) values (2);
Warnings:
Warning 1364 Field 'd' doesn't have a default value
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
desc bug20691;
Field Type Null Key Default Extra
i int(11) YES NULL
d datetime NO NULL
dn datetime NO 0000-00-00 00:00:00
-insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT);
+insert ignore into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT);
Warnings:
Warning 1364 Field 'd' doesn't have a default value
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
Warning 1364 Field 'd' doesn't have a default value
-insert into bug20691 (i) values (4);
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
+insert ignore into bug20691 (i) values (4);
Warnings:
Warning 1364 Field 'd' doesn't have a default value
-insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT);
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
+insert ignore into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT);
Warnings:
Warning 1364 Field 'd' doesn't have a default value
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
Warning 1364 Field 'd' doesn't have a default value
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'dn'
SET sql_mode = 'ALLOW_INVALID_DATES';
insert into bug20691 values (6, DEFAULT, DEFAULT), (6, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (6, DEFAULT, DEFAULT);
Warnings:
@@ -1054,7 +1064,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(30,6) DEFAULT coalesce(curtime(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
@@ -1067,7 +1077,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` decimal(30,6) DEFAULT coalesce(curdate())
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
@@ -1123,7 +1133,7 @@ t1 CREATE TABLE `t1` (
`a` decimal(30,0) DEFAULT current_timestamp(6),
`b` decimal(30,0) DEFAULT coalesce(current_timestamp(6))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
Warnings:
Note 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'b' at row 1
@@ -1513,7 +1523,7 @@ t1 CREATE TABLE `t1` (
INSERT INTO t1 VALUES ('2000:01:01 00:00:00', '2000:01:02 10:20:30', DEFAULT);
SELECT * FROM t1;
a b c
-2000-01-01 00:00:00 2000-01-02 10:20:30 -34:20:30
+2000-01-01 00:00:00 2000-01-02 10:20:30 NULL
DROP TABLE t1;
CREATE TABLE t1 (hh INT, mm INT, ss INT, t TIME DEFAULT MAKETIME(hh,mm,ss));
SHOW CREATE TABLE t1;
@@ -2181,7 +2191,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(10) DEFAULT (cast(`a` as char(10) charset latin1)),
`c` varchar(10) DEFAULT (cast(`a` as char(4) charset latin1))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 (a) VALUES (123.456);
+INSERT IGNORE INTO t1 (a) VALUES (123.456);
Warnings:
Warning 1292 Truncated incorrect CHAR(4) value: '123.456'
SELECT * FROM t1;
@@ -2195,7 +2205,7 @@ t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL,
`b` int(10) unsigned DEFAULT (cast(`a` as unsigned))
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 (a) VALUES (-1);
+INSERT IGNORE INTO t1 (a) VALUES (-1);
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
Warning 1264 Out of range value for column 'b' at row 1
@@ -2644,7 +2654,7 @@ t1 CREATE TABLE `t1` (
`number_of_bits` int(11) DEFAULT NULL,
`x` varchar(30) DEFAULT export_set(`bits`,`v_on`,`v_off`,`v_separator`,`number_of_bits`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
+INSERT IGNORE INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
Warnings:
Warning 1265 Data truncated for column 'x' at row 1
SELECT * FROM t1;
diff --git a/mysql-test/r/default_session.result b/mysql-test/r/default_session.result
index b00bf27dcf3..ee07508816f 100644
--- a/mysql-test/r/default_session.result
+++ b/mysql-test/r/default_session.result
@@ -83,12 +83,14 @@ a mn dn df
2010-12-02 Dezember Donnerstag Do, Dez
drop table t1;
create table t1 (a varchar(100) default @@sql_mode);
-insert t1 () values ();
+insert ignore t1 () values ();
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
set sql_mode=ansi;
insert t1 () values ();
set sql_mode=default;
select * from t1;
a
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_E
REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ANSI
drop table t1;
diff --git a/mysql-test/r/delete.result b/mysql-test/r/delete.result
index ed3683d52f9..29da4e47d94 100644
--- a/mysql-test/r/delete.result
+++ b/mysql-test/r/delete.result
@@ -217,7 +217,9 @@ select * from t3;
a b
drop table t1,t2,t3;
create table t1(a date not null);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
select * from t1 where a is null;
a
0000-00-00
diff --git a/mysql-test/r/derived.result b/mysql-test/r/derived.result
index 9e550284163..bcbdd9a2ac8 100644
--- a/mysql-test/r/derived.result
+++ b/mysql-test/r/derived.result
@@ -330,7 +330,9 @@ id select_type table type possible_keys key key_len ref rows Extra
1 PRIMARY <derived2> ALL NULL NULL NULL NULL 2
2 DERIVED t2 index PRIMARY PRIMARY 4 NULL 2 Using where; Using index
drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `itemid` int(11) NOT NULL default '0', `grpid` varchar(15) NOT NULL default '', `vendor` int(11) NOT NULL default '0', `date_` date NOT NULL default '0000-00-00', `price` decimal(12,2) NOT NULL default '0.00', PRIMARY KEY (`itemid`,`grpid`,`vendor`,`date_`), KEY `itemid` (`itemid`,`vendor`), KEY `itemid_2` (`itemid`,`date_`));
+SET sql_mode = DEFAULT;
insert into t1 values (128, 'rozn', 2, curdate(), 10),
(128, 'rozn', 1, curdate(), 10);
SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MAX(concat(date_,";",price)), 12) price FROM t1 WHERE itemid=128 AND grpid='rozn' GROUP BY itemid, grpid, vendor) lastprices;
diff --git a/mysql-test/r/derived_view.result b/mysql-test/r/derived_view.result
index 316d7bdc4bc..7c73cc8bdab 100644
--- a/mysql-test/r/derived_view.result
+++ b/mysql-test/r/derived_view.result
@@ -1955,9 +1955,12 @@ CREATE TABLE t5 (
a int NOT NULL, c int NOT NULL, b int NOT NULL, f date NOT NULL,
g date NOT NULL, h time NOT NULL, j time NOT NULL, k datetime NOT NULL
);
-INSERT INTO t5 VALUES
+INSERT IGNORE INTO t5 VALUES
(1,4,0,'0000-00-00','0000-00-00','21:22:34','21:22:34','2002-02-13 17:30'),
(2,6,8,'2004-09-18','2004-09-18','10:50:38','10:50:38','2008-09-27 00:34');
+Warnings:
+Warning 1264 Out of range value for column 'f' at row 1
+Warning 1264 Out of range value for column 'g' at row 1
CREATE VIEW v3 AS SELECT t3.*, t4.i FROM t3, t4, t5;
SET SESSION join_cache_level = 1;
SET SESSION join_buffer_size = 512;
@@ -2745,6 +2748,7 @@ familyid int(11) DEFAULT NULL,
withdrawndate date DEFAULT NULL,
KEY index_td_familyid_id (familyid,id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
id int(11) NOT NULL AUTO_INCREMENT,
activefromts datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -2753,6 +2757,7 @@ useraccessfamily varchar(512) DEFAULT NULL,
serialized longtext,
PRIMARY KEY (id)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+SET sql_mode = DEFAULT;
insert into t1 values ('picture/89/1369722032695.pmd',89,NULL);
insert into t1 values ('picture/90/1369832057370.pmd',90,NULL);
insert into t2 values (38,'2013-03-04 07:49:22','desc','CODE','string');
diff --git a/mysql-test/r/distinct.result b/mysql-test/r/distinct.result
index 8d7074cd270..243c64ec6d9 100644
--- a/mysql-test/r/distinct.result
+++ b/mysql-test/r/distinct.result
@@ -407,8 +407,12 @@ test3@testdomain.com Z001
drop table t1,t2;
CREATE TABLE t1 (privatemessageid int(10) unsigned NOT NULL auto_increment, folderid smallint(6) NOT NULL default '0', userid int(10) unsigned NOT NULL default '0', touserid int(10) unsigned NOT NULL default '0', fromuserid int(10) unsigned NOT NULL default '0', title varchar(250) NOT NULL default '', message mediumtext NOT NULL, dateline int(10) unsigned NOT NULL default '0', showsignature smallint(6) NOT NULL default '0', iconid smallint(5) unsigned NOT NULL default '0', messageread smallint(6) NOT NULL default '0', readtime int(10) unsigned NOT NULL default '0', receipt smallint(6) unsigned NOT NULL default '0', deleteprompt smallint(6) unsigned NOT NULL default '0', multiplerecipients smallint(6) unsigned NOT NULL default '0', PRIMARY KEY (privatemessageid), KEY userid (userid)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (128,0,33,33,8,':D','',996121863,1,0,2,996122850,2,0,0);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (userid int(10) unsigned NOT NULL auto_increment, usergroupid smallint(5) unsigned NOT NULL default '0', username varchar(50) NOT NULL default '', password varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', styleid smallint(5) unsigned NOT NULL default '0', parentemail varchar(50) NOT NULL default '', coppauser smallint(6) NOT NULL default '0', homepage varchar(100) NOT NULL default '', icq varchar(20) NOT NULL default '', aim varchar(20) NOT NULL default '', yahoo varchar(20) NOT NULL default '', signature mediumtext NOT NULL, adminemail smallint(6) NOT NULL default '0', showemail smallint(6) NOT NULL default '0', invisible smallint(6) NOT NULL default '0', usertitle varchar(250) NOT NULL default '', customtitle smallint(6) NOT NULL default '0', joindate int(10) unsigned NOT NULL default '0', cookieuser smallint(6) NOT NULL default '0', daysprune smallint(6) NOT NULL default '0', lastvisit int(10) unsigned NOT NULL default '0', lastactivity int(10) unsigned NOT NULL default '0', lastpost int(10) unsigned NOT NULL default '0', posts smallint(5) unsigned NOT NULL default '0', timezoneoffset varchar(4) NOT NULL default '', emailnotification smallint(6) NOT NULL default '0', buddylist mediumtext NOT NULL, ignorelist mediumtext NOT NULL, pmfolders mediumtext NOT NULL, receivepm smallint(6) NOT NULL default '0', emailonpm smallint(6) NOT NULL default '0', pmpopup smallint(6) NOT NULL default '0', avatarid smallint(6) NOT NULL default '0', avatarrevision int(6) unsigned NOT NULL default '0', options smallint(6) NOT NULL default '15', birthday date NOT NULL default '0000-00-00', maxposts smallint(6) NOT NULL default '-1', startofweek smallint(6) NOT NULL default '1', ipaddress varchar(20) NOT NULL default '', referrerid int(10) unsigned NOT NULL default '0', nosessionhash smallint(6) NOT NULL default '0', autorefresh smallint(6) NOT NULL default '-1', messagepopup tinyint(2) NOT NULL default '0', inforum smallint(5) unsigned NOT NULL default '0', ratenum smallint(5) unsigned NOT NULL default '0', ratetotal smallint(5) unsigned NOT NULL default '0', allowrate smallint(5) unsigned NOT NULL default '1', PRIMARY KEY (userid), KEY usergroupid (usergroupid), KEY username (username), KEY inforum (inforum)) ENGINE=MyISAM;
-INSERT INTO t2 VALUES (33,6,'Kevin','0','kevin@stileproject.com',1,'',0,'http://www.stileproject.com','','','','',1,1,0,'Administrator',0,996120694,1,-1,1030996168,1031027028,1030599436,36,'-6',0,'','','',1,0,1,0,0,15,'0000-00-00',-1,1,'64.0.0.0',0,1,-1,0,0,4,19,1);
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 VALUES (33,6,'Kevin','0','kevin@stileproject.com',1,'',0,'http://www.stileproject.com','','','','',1,1,0,'Administrator',0,996120694,1,-1,1030996168,1031027028,1030599436,36,'-6',0,'','','',1,0,1,0,0,15,'0000-00-00',-1,1,'64.0.0.0',0,1,-1,0,0,4,19,1);
+Warnings:
+Warning 1264 Out of range value for column 'birthday' at row 1
SELECT DISTINCT t1.*, t2.* FROM t1 LEFT JOIN t2 ON (t2.userid = t1.touserid);
privatemessageid folderid userid touserid fromuserid title message dateline showsignature iconid messageread readtime receipt deleteprompt multiplerecipients userid usergroupid username password email styleid parentemail coppauser homepage icq aim yahoo signature adminemail showemail invisible usertitle customtitle joindate cookieuser daysprune lastvisit lastactivity lastpost posts timezoneoffset emailnotification buddylist ignorelist pmfolders receivepm emailonpm pmpopup avatarid avatarrevision options birthday maxposts startofweek ipaddress referrerid nosessionhash autorefresh messagepopup inforum ratenum ratetotal allowrate
128 0 33 33 8 :D 996121863 1 0 2 996122850 2 0 0 33 6 Kevin 0 kevin@stileproject.com 1 0 http://www.stileproject.com 1 1 0 Administrator 0 996120694 1 -1 1030996168 1031027028 1030599436 36 -6 0 1 0 1 0 0 15 0000-00-00 -1 1 64.0.0.0 0 1 -1 0 0 4 19 1
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index 23d697835b0..3fee3eaf99e 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -666,10 +666,14 @@ column_get(column_create(1, "2011-04-05 8:46:06.23434" AS datetime), 1 as dateti
2011-04-05 08:46:06.234340
select column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as datetime);
column_get(column_create(1, "2011-00-00 8:46:06.23434" AS CHAR), 1 as datetime)
-2011-00-00 08:46:06
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-00-00 8:46:06.23434'
select column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as datetime);
column_get(column_create(1, "2011-00-01 8:46:06.23434" AS CHAR), 1 as datetime)
-2011-00-01 08:46:06
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2011-00-01 8:46:06.23434'
select column_get(column_create(1, 20010203 as unsigned int), 1 as datetime);
column_get(column_create(1, 20010203 as unsigned int), 1 as datetime)
2001-02-03 00:00:00
@@ -693,7 +697,9 @@ column_get(column_create(1, "20010203"), 1 as datetime)
2001-02-03 00:00:00
select column_get(column_create(1, 0), 1 as datetime);
column_get(column_create(1, 0), 1 as datetime)
-0000-00-00 00:00:00
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0'
select column_get(column_create(1, "2001021"), 1 as datetime);
column_get(column_create(1, "2001021"), 1 as datetime)
2020-01-02 01:00:00
diff --git a/mysql-test/r/errors.result b/mysql-test/r/errors.result
index 07fa646d558..cf3e738395a 100644
--- a/mysql-test/r/errors.result
+++ b/mysql-test/r/errors.result
@@ -32,6 +32,8 @@ set sql_mode=default;
CREATE TABLE t1 (a INT);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
+Warnings:
+Warning 1365 Division by 0
INSERT INTO t1 VALUES(1);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
@@ -40,6 +42,8 @@ INSERT INTO t1 VALUES(2),(3);
SELECT a FROM t1 WHERE a IN(1, (SELECT IF(1=0,1,2/0)));
a
1
+Warnings:
+Warning 1365 Division by 0
DROP TABLE t1;
CREATE TABLE t1( a INT );
SELECT b FROM t1;
diff --git a/mysql-test/r/events_restart.result b/mysql-test/r/events_restart.result
index 0caac907f64..f1b2c9bcb56 100644
--- a/mysql-test/r/events_restart.result
+++ b/mysql-test/r/events_restart.result
@@ -10,10 +10,12 @@ create event abc2 on schedule every 1 second do
insert into execution_log value('abc2');
create event abc3 on schedule every 1 second do
insert into execution_log value('abc3');
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table event_like like mysql.event;
insert into event_like select * from mysql.event;
alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin;
+set sql_mode = DEFAULT;
"Now we restart the server"
use events_test;
select @@event_scheduler;
diff --git a/mysql-test/r/failed_auth_3909.result b/mysql-test/r/failed_auth_3909.result
index 8b41ef4618a..d0fd2c41221 100644
--- a/mysql-test/r/failed_auth_3909.result
+++ b/mysql-test/r/failed_auth_3909.result
@@ -1,7 +1,7 @@
optimize table mysql.user;
Table Op Msg_type Msg_text
mysql.user optimize status OK
-insert mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar');
+insert ignore mysql.user (user,plugin) values ('foo','bar'),('bar','bar'),('baz','bar');
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
Warning 1364 Field 'x509_issuer' doesn't have a default value
diff --git a/mysql-test/r/fulltext.result b/mysql-test/r/fulltext.result
index a81faeebaf2..e00384eeed1 100644
--- a/mysql-test/r/fulltext.result
+++ b/mysql-test/r/fulltext.result
@@ -379,12 +379,14 @@ t collation(t)
SELECT t, collation(t),FORMAT(MATCH t AGAINST ('Osnabruck'),6) FROM t1 WHERE MATCH t AGAINST ('Osnabruck');
t collation(t) FORMAT(MATCH t AGAINST ('Osnabruck'),6)
aus Osnabrück utf8_general_ci 1.591140
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
Warnings:
Warning 1366 Incorrect string value: '\xD0\xAD\xD1\x82\xD0\xBE...' for column 't' at row 3
Warning 1366 Incorrect string value: '\xD0\x9E\xD1\x82\xD0\xBB...' for column 't' at row 4
Warning 1366 Incorrect string value: '\xD0\x9D\xD0\xB5 \xD0...' for column 't' at row 5
Warning 1366 Incorrect string value: '\xD0\xB8 \xD0\xB1\xD1...' for column 't' at row 6
+set sql_mode = DEFAULT;
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
t collation(t)
aus Osnabrück latin1_german2_ci
diff --git a/mysql-test/r/func_gconcat.result b/mysql-test/r/func_gconcat.result
index 75d227b41d3..0c3d649a6bb 100644
--- a/mysql-test/r/func_gconcat.result
+++ b/mysql-test/r/func_gconcat.result
@@ -810,7 +810,7 @@ LENGTH( GROUP_CONCAT( DISTINCT a ) )
CREATE TABLE t3( a TEXT, b INT );
INSERT INTO t3 VALUES( REPEAT( 'a', 65534 ), 1 );
INSERT INTO t3 VALUES( REPEAT( 'a', 65535 ), 2 );
-INSERT INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 );
+INSERT IGNORE INTO t3 VALUES( REPEAT( 'a', 65536 ), 3 );
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1;
@@ -834,7 +834,7 @@ id group_concat(b.name)
2 óra,óra
drop table t1;
create table t1(a bit not null);
-insert into t1 values (), (), ();
+insert ignore into t1 values (), (), ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select group_concat(distinct a) from t1;
diff --git a/mysql-test/r/func_hybrid_type.result b/mysql-test/r/func_hybrid_type.result
index 746bc55ef85..2d0f3868e1b 100644
--- a/mysql-test/r/func_hybrid_type.result
+++ b/mysql-test/r/func_hybrid_type.result
@@ -165,6 +165,7 @@ least____a_b -2147483648
least____b_a -2147483648
greatest_a_b 4294967295
greatest_b_a 4294967295
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -186,6 +187,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -209,6 +211,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(10) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -224,6 +227,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -372,6 +376,7 @@ least____a_b -2147483648
least____b_a -2147483648
greatest_a_b 2147483647
greatest_b_a 2147483647
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -393,6 +398,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -416,6 +422,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -431,6 +438,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -579,6 +587,7 @@ least____a_b -9223372036854775808
least____b_a -9223372036854775808
greatest_a_b 18446744073709551615
greatest_b_a 18446744073709551615
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -600,6 +609,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -623,6 +633,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` bigint(20) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -638,6 +649,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -786,6 +798,7 @@ least____a_b -9223372036854775808
least____b_a -9223372036854775808
greatest_a_b 9223372036854775807
greatest_b_a 9223372036854775807
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -807,6 +820,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -830,6 +844,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` bigint(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -845,6 +860,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -962,6 +978,7 @@ least____a_b -2147483648
least____b_a -2147483648
greatest_a_b 50
greatest_b_a 50
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -983,6 +1000,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1006,6 +1024,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(8) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1021,6 +1040,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1138,6 +1158,7 @@ least____a_b 50
least____b_a 50
greatest_a_b 4294967295
greatest_b_a 4294967295
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -1159,6 +1180,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1182,6 +1204,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(8) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1197,6 +1220,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1314,6 +1338,7 @@ least____a_b 50
least____b_a 50
greatest_a_b 50
greatest_b_a 50
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -1335,6 +1360,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1358,6 +1384,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(8) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1373,6 +1400,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1490,6 +1518,7 @@ least____a_b -32678
least____b_a -32678
greatest_a_b 1
greatest_b_a 1
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -1511,6 +1540,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1534,6 +1564,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(6) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1549,6 +1580,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1666,6 +1698,7 @@ least____a_b a
least____b_a a
greatest_a_b b
greatest_b_a b
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -1687,6 +1720,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1710,6 +1744,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1725,6 +1760,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1842,6 +1878,7 @@ least____a_b -2147483648
least____b_a -2147483648
greatest_a_b 2015
greatest_b_a 2015
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -1863,6 +1900,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -1886,6 +1924,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(4) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -1901,6 +1940,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2018,6 +2058,7 @@ least____a_b 2015
least____b_a 2015
greatest_a_b 4294967295
greatest_b_a 4294967295
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2039,6 +2080,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2062,6 +2104,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` int(4) unsigned DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2077,6 +2120,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2195,6 +2239,7 @@ least____a_b 2001-01-01 10:20:30
least____b_a 2001-01-01 10:20:30
greatest_a_b 2010-01-01 00:00:00
greatest_b_a 2010-01-01 00:00:00
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2216,6 +2261,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2239,6 +2285,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2254,6 +2301,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2373,6 +2421,7 @@ least____a_b 2001-01-01 10:20:30
least____b_a 2001-01-01 10:20:30
greatest_a_b 2010-01-01 00:00:00
greatest_b_a 2010-01-01 00:00:00
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2394,6 +2443,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2417,6 +2467,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2432,6 +2483,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2551,6 +2603,7 @@ least____a_b 2001-01-01 10:20:30
least____b_a 2001-01-01 10:20:30
greatest_a_b 2010-01-01 00:00:00
greatest_b_a 2010-01-01 00:00:00
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2572,6 +2625,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2595,6 +2649,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2610,6 +2665,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2729,6 +2785,7 @@ least____a_b 2001-01-02 00:00:00
least____b_a 2001-01-02 00:00:00
greatest_a_b 2010-01-01 10:20:30
greatest_b_a 2010-01-01 10:20:30
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2750,6 +2807,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2773,6 +2831,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` date DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2788,6 +2847,7 @@ LEAST(b, a) AS least____b_a,
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2921,6 +2981,7 @@ Message Truncated incorrect DOUBLE value: '100x'
Level Warning
Code 1292
Message Truncated incorrect DOUBLE value: '100x'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -2942,6 +3003,7 @@ IFNULL(b, b) AS ifnull___b_b,
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -2965,6 +3027,7 @@ t2 CREATE TABLE `t2` (
`greatest_b_b` varchar(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
CASE WHEN a IS NOT NULL THEN a ELSE b END AS case_____a_b,
@@ -2985,6 +3048,7 @@ Warning 1292 Truncated incorrect DOUBLE value: '100x'
Warning 1292 Truncated incorrect DOUBLE value: '100x'
Warning 1292 Truncated incorrect DOUBLE value: '100x'
Warning 1292 Truncated incorrect DOUBLE value: '100x'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -3047,7 +3111,9 @@ GREATEST(a,a)
2010-01-01 10:20:30
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP, b DATETIME);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS SELECT LEAST(a,a),LEAST(b,b),LEAST(a,b) FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/r/func_in.result b/mysql-test/r/func_in.result
index aaf1d981e59..d18681bc80d 100644
--- a/mysql-test/r/func_in.result
+++ b/mysql-test/r/func_in.result
@@ -487,6 +487,8 @@ CREATE TABLE t1 (id int not null);
INSERT INTO t1 VALUES (1),(2);
SELECT id FROM t1 WHERE id IN(4564, (SELECT IF(1=0,1,1/0)) );
id
+Warnings:
+Warning 1365 Division by 0
DROP TABLE t1;
End of 5.0 tests
create table t1(f1 char(1));
@@ -627,9 +629,9 @@ c_char CHAR(10) NOT NULL,
INDEX(c_int), INDEX(c_decimal), INDEX(c_float), INDEX(c_bit), INDEX(c_date),
INDEX(c_datetime), INDEX(c_timestamp), INDEX(c_time), INDEX(c_year),
INDEX(c_char));
-INSERT INTO t1 (c_int) VALUES (1), (2), (3), (4), (5);
-INSERT INTO t1 (c_int) SELECT 0 FROM t1;
-INSERT INTO t1 (c_int) SELECT 0 FROM t1;
+INSERT IGNORE INTO t1 (c_int) VALUES (1), (2), (3), (4), (5);
+INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1;
+INSERT IGNORE INTO t1 (c_int) SELECT 0 FROM t1;
EXPLAIN SELECT * FROM t1 WHERE c_int IN (1, 2, 3);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 range c_int c_int 4 NULL 3 Using index condition
diff --git a/mysql-test/r/func_json.result b/mysql-test/r/func_json.result
index 6c1987cc3e7..47b18891b9d 100644
--- a/mysql-test/r/func_json.result
+++ b/mysql-test/r/func_json.result
@@ -260,7 +260,7 @@ create table t1 as select json_object('id', 87, 'name', 'carrot') as f;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `f` varchar(32) NOT NULL
+ `f` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
f
@@ -285,7 +285,7 @@ json_quote('foo')
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `json_quote('foo')` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL
+ `json_quote('foo')` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select json_merge('string');
diff --git a/mysql-test/r/func_like.result b/mysql-test/r/func_like.result
index 0a309bcfab6..0ba8e41f164 100644
--- a/mysql-test/r/func_like.result
+++ b/mysql-test/r/func_like.result
@@ -175,7 +175,7 @@ End of 4.1 tests
#
CREATE TABLE t1(a SET('a') NOT NULL, UNIQUE KEY(a));
CREATE TABLE t2(b INT PRIMARY KEY);
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
INSERT INTO t2 VALUES (1), (2), (3);
diff --git a/mysql-test/r/func_math.result b/mysql-test/r/func_math.result
index f02776d4448..8ca10203add 100644
--- a/mysql-test/r/func_math.result
+++ b/mysql-test/r/func_math.result
@@ -45,6 +45,10 @@ Note 1003 select abs(-10) AS `abs(-10)`,sign(-5) AS `sign(-5)`,sign(5) AS `sign(
select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
log(exp(10)) exp(log(sqrt(10))*2) log(-1) log(NULL) log(1,1) log(3,9) log(-1,2) log(NULL,2)
10 10.000000000000002 NULL NULL NULL 2 NULL NULL
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
explain extended select log(exp(10)),exp(log(sqrt(10))*2),log(-1),log(NULL),log(1,1),log(3,9),log(-1,2),log(NULL,2);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -53,6 +57,9 @@ Note 1003 select log(exp(10)) AS `log(exp(10))`,exp(log(sqrt(10)) * 2) AS `exp(l
select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
ln(exp(10)) exp(ln(sqrt(10))*2) ln(-1) ln(0) ln(NULL)
10 10.000000000000002 NULL NULL NULL
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
explain extended select ln(exp(10)),exp(ln(sqrt(10))*2),ln(-1),ln(0),ln(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -61,6 +68,9 @@ Note 1003 select ln(exp(10)) AS `ln(exp(10))`,exp(ln(sqrt(10)) * 2) AS `exp(ln(s
select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
log2(8) log2(15) log2(-2) log2(0) log2(NULL)
3 3.9068905956085187 NULL NULL NULL
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
explain extended select log2(8),log2(15),log2(-2),log2(0),log2(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -69,6 +79,9 @@ Note 1003 select log2(8) AS `log2(8)`,log2(15) AS `log2(15)`,log2(-2) AS `log2(-
select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
log10(100) log10(18) log10(-4) log10(0) log10(NULL)
2 1.255272505103306 NULL NULL NULL
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
explain extended select log10(100),log10(18),log10(-4),log10(0),log10(NULL);
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -688,6 +701,8 @@ ERROR 22003: DECIMAL value is out of range in '@`a` / 0.5'
SELECT COT(1/0);
COT(1/0)
NULL
+Warnings:
+Warning 1365 Division by 0
SELECT -1 + 9223372036854775808;
-1 + 9223372036854775808
9223372036854775807
@@ -697,6 +712,9 @@ SELECT 2 DIV -2;
SELECT -(1 DIV 0);
-(1 DIV 0)
NULL
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
SELECT -9223372036854775808 MOD -1;
-9223372036854775808 MOD -1
0
@@ -715,7 +733,7 @@ Warning 1292 Truncated incorrect DOUBLE value: '179,769,313,486,231,570,000,000,
# my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed
#
CREATE TABLE t1(a char(0));
-INSERT INTO t1 (SELECT -pi());
+INSERT IGNORE INTO t1 (SELECT -pi());
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
DROP TABLE t1;
@@ -728,6 +746,7 @@ SELECT ((@a:=@b:=1.0) div (@b:=@a:=get_format(datetime, 'usa')));
NULL
Warnings:
Warning 1918 Encountered illegal value '' when converting to DECIMAL
+Warning 1365 Division by 0
#
# Bug #59498 div function broken in mysql-trunk
#
@@ -767,6 +786,8 @@ foo
select 999999999999999999999999999999999999999999999999999999999999999999999999999999999 % 0.0 as foo;
foo
NULL
+Warnings:
+Warning 1365 Division by 0
#
# Bug#12711164 - 61676:
# RESULT OF DIV WITH DECIMAL AND INTEGER DOES NOT MAKE SENSE
diff --git a/mysql-test/r/func_misc.result b/mysql-test/r/func_misc.result
index 10423a4b105..bbc7f1a0a0a 100644
--- a/mysql-test/r/func_misc.result
+++ b/mysql-test/r/func_misc.result
@@ -107,8 +107,8 @@ create table t1 as select uuid(), length(uuid());
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `uuid()` varchar(36) CHARACTER SET utf8 NOT NULL,
- `length(uuid())` int(10) NOT NULL
+ `uuid()` varchar(36) CHARACTER SET utf8 DEFAULT NULL,
+ `length(uuid())` int(10) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select INET_ATON('255.255.0.1') as `a`;
diff --git a/mysql-test/r/func_regexp_pcre.result b/mysql-test/r/func_regexp_pcre.result
index fcff0484b65..ffd24b20893 100644
--- a/mysql-test/r/func_regexp_pcre.result
+++ b/mysql-test/r/func_regexp_pcre.result
@@ -436,7 +436,7 @@ CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `REGEXP_REPLACE('abc','b','x')` longtext CHARACTER SET utf8 NOT NULL
+ `REGEXP_REPLACE('abc','b','x')` longtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x');
@@ -444,9 +444,11 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select regexp_replace('abc','b','x') AS `REGEXP_REPLACE('abc','b','x')`
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'axc'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -738,7 +740,7 @@ CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `REGEXP_SUBSTR('abc','b')` varchar(3) CHARACTER SET utf8 NOT NULL
+ `REGEXP_SUBSTR('abc','b')` varchar(3) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b');
@@ -746,9 +748,11 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select regexp_substr('abc','b') AS `REGEXP_SUBSTR('abc','b')`
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/func_set.result b/mysql-test/r/func_set.result
index 3ffbe275fb9..46be54ca6a4 100644
--- a/mysql-test/r/func_set.result
+++ b/mysql-test/r/func_set.result
@@ -148,7 +148,7 @@ NULL
drop table t1;
CREATE TABLE t1( a SET('a', 'b', 'c') );
CREATE TABLE t2( a SET('a', 'b', 'c') );
-INSERT INTO t1 VALUES ('d');
+INSERT IGNORE INTO t1 VALUES ('d');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
INSERT INTO t2 VALUES ('');
diff --git a/mysql-test/r/func_str.result b/mysql-test/r/func_str.result
index ac7ab2bede6..8ca0d8c0297 100644
--- a/mysql-test/r/func_str.result
+++ b/mysql-test/r/func_str.result
@@ -318,6 +318,8 @@ quote(concat('abc\'', '\\cba'))
select quote(1/0), quote('\0\Z');
quote(1/0) quote('\0\Z')
NULL '\0\Z'
+Warnings:
+Warning 1365 Division by 0
select length(quote(concat(char(0),"test")));
length(quote(concat(char(0),"test")))
8
@@ -729,34 +731,34 @@ t1 CREATE TABLE `t1` (
`bin(130)` varchar(64) DEFAULT NULL,
`oct(130)` varchar(64) DEFAULT NULL,
`conv(130,16,10)` varchar(64) DEFAULT NULL,
- `hex(130)` varchar(6) NOT NULL,
- `char(130)` varbinary(4) NOT NULL,
- `format(130,10)` varchar(45) NOT NULL,
- `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL,
- `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 NOT NULL,
- `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL,
- `ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 NOT NULL,
- `substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 NOT NULL,
- `concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 NOT NULL,
- `lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL,
- `rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 NOT NULL,
- `concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 NOT NULL,
- `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 NOT NULL,
- `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 NOT NULL,
- `trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 NOT NULL,
- `repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 NOT NULL,
- `reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 NOT NULL,
- `quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 NOT NULL,
- `soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 NOT NULL,
- `substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 NOT NULL,
- `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 NOT NULL,
- `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 NOT NULL,
- `encode('abcd','ab')` varbinary(4) NOT NULL
+ `hex(130)` varchar(6) DEFAULT NULL,
+ `char(130)` varbinary(4) DEFAULT NULL,
+ `format(130,10)` varchar(45) DEFAULT NULL,
+ `left(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `right(_latin2'a',1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `lcase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `ucase(_latin2'a')` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `substring(_latin2'a',1,1)` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `concat(_latin2'a',_latin2'b')` varchar(2) CHARACTER SET latin2 DEFAULT NULL,
+ `lpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 DEFAULT NULL,
+ `rpad(_latin2'a',4,_latin2'b')` varchar(4) CHARACTER SET latin2 DEFAULT NULL,
+ `concat_ws(_latin2'a',_latin2'b')` varchar(1) CHARACTER SET latin2 DEFAULT NULL,
+ `make_set(255,_latin2'a',_latin2'b',_latin2'c')` varchar(5) CHARACTER SET latin2 DEFAULT NULL,
+ `export_set(255,_latin2'y',_latin2'n',_latin2' ')` varchar(127) CHARACTER SET latin2 DEFAULT NULL,
+ `trim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `ltrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `rtrim(_latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `trim(LEADING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `trim(TRAILING _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `trim(BOTH _latin2' ' FROM _latin2' a ')` varchar(3) CHARACTER SET latin2 DEFAULT NULL,
+ `repeat(_latin2'a',10)` varchar(10) CHARACTER SET latin2 DEFAULT NULL,
+ `reverse(_latin2'ab')` varchar(2) CHARACTER SET latin2 DEFAULT NULL,
+ `quote(_latin2'ab')` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
+ `soundex(_latin2'ab')` varchar(4) CHARACTER SET latin2 DEFAULT NULL,
+ `substring(_latin2'ab',1)` varchar(2) CHARACTER SET latin2 DEFAULT NULL,
+ `insert(_latin2'abcd',2,3,_latin2'ef')` varchar(6) CHARACTER SET latin2 DEFAULT NULL,
+ `replace(_latin2'abcd',_latin2'b',_latin2'B')` varchar(4) CHARACTER SET latin2 DEFAULT NULL,
+ `encode('abcd','ab')` varbinary(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a char character set latin2);
@@ -1062,11 +1064,11 @@ aaaaaaaaaaccccc
bbbbbbbbbbddddd
drop table t1, t2;
create table t1 (c1 INT, c2 INT UNSIGNED);
-insert into t1 values ('21474836461','21474836461');
+insert ignore into t1 values ('21474836461','21474836461');
Warnings:
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');
+insert ignore into t1 values ('-21474836461','-21474836461');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
Warning 1264 Out of range value for column 'c2' at row 1
@@ -2855,7 +2857,7 @@ CREATE TABLE t1 AS SELECT format(123,2,'no_NO');
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `format(123,2,'no_NO')` varchar(45) NOT NULL
+ `format(123,2,'no_NO')` varchar(45) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT * FROM t1;
format(123,2,'no_NO')
@@ -2997,7 +2999,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',63)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(85) NOT NULL
+ `to_base64` varchar(85) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3019,7 +3021,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',62)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(85) NOT NULL
+ `to_base64` varchar(85) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3041,7 +3043,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',61)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(85) NOT NULL
+ `to_base64` varchar(85) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3063,7 +3065,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',60)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(81) NOT NULL
+ `to_base64` varchar(81) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3085,7 +3087,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',59)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(81) NOT NULL
+ `to_base64` varchar(81) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3107,7 +3109,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',58)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(81) NOT NULL
+ `to_base64` varchar(81) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3129,7 +3131,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',57)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(76) NOT NULL
+ `to_base64` varchar(76) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3150,7 +3152,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',56)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(76) NOT NULL
+ `to_base64` varchar(76) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3171,7 +3173,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',55)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(76) NOT NULL
+ `to_base64` varchar(76) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3192,7 +3194,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',54)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(72) NOT NULL
+ `to_base64` varchar(72) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3213,7 +3215,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',53)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(72) NOT NULL
+ `to_base64` varchar(72) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3234,7 +3236,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',52)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(72) NOT NULL
+ `to_base64` varchar(72) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3255,7 +3257,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',51)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(68) NOT NULL
+ `to_base64` varchar(68) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3276,7 +3278,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',50)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(68) NOT NULL
+ `to_base64` varchar(68) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3297,7 +3299,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',49)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(68) NOT NULL
+ `to_base64` varchar(68) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3318,7 +3320,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',48)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(64) NOT NULL
+ `to_base64` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3339,7 +3341,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',47)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(64) NOT NULL
+ `to_base64` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3360,7 +3362,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',46)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(64) NOT NULL
+ `to_base64` varchar(64) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3381,7 +3383,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',45)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(60) NOT NULL
+ `to_base64` varchar(60) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3402,7 +3404,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',44)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(60) NOT NULL
+ `to_base64` varchar(60) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3423,7 +3425,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',43)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(60) NOT NULL
+ `to_base64` varchar(60) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3444,7 +3446,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',42)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(56) NOT NULL
+ `to_base64` varchar(56) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3465,7 +3467,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',41)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(56) NOT NULL
+ `to_base64` varchar(56) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3486,7 +3488,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',40)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(56) NOT NULL
+ `to_base64` varchar(56) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3507,7 +3509,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',39)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(52) NOT NULL
+ `to_base64` varchar(52) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3528,7 +3530,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',38)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(52) NOT NULL
+ `to_base64` varchar(52) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3549,7 +3551,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',37)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(52) NOT NULL
+ `to_base64` varchar(52) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3570,7 +3572,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',36)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(48) NOT NULL
+ `to_base64` varchar(48) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3591,7 +3593,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',35)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(48) NOT NULL
+ `to_base64` varchar(48) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3612,7 +3614,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',34)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(48) NOT NULL
+ `to_base64` varchar(48) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3633,7 +3635,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',33)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(44) NOT NULL
+ `to_base64` varchar(44) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3654,7 +3656,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',32)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(44) NOT NULL
+ `to_base64` varchar(44) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3675,7 +3677,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',31)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(44) NOT NULL
+ `to_base64` varchar(44) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3696,7 +3698,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',30)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(40) NOT NULL
+ `to_base64` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3717,7 +3719,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',29)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(40) NOT NULL
+ `to_base64` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3738,7 +3740,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',28)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(40) NOT NULL
+ `to_base64` varchar(40) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3759,7 +3761,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',27)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(36) NOT NULL
+ `to_base64` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3780,7 +3782,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',26)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(36) NOT NULL
+ `to_base64` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3801,7 +3803,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',25)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(36) NOT NULL
+ `to_base64` varchar(36) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3822,7 +3824,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',24)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(32) NOT NULL
+ `to_base64` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3843,7 +3845,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',23)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(32) NOT NULL
+ `to_base64` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3864,7 +3866,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',22)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(32) NOT NULL
+ `to_base64` varchar(32) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3885,7 +3887,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',21)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(28) NOT NULL
+ `to_base64` varchar(28) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3906,7 +3908,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',20)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(28) NOT NULL
+ `to_base64` varchar(28) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3927,7 +3929,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',19)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(28) NOT NULL
+ `to_base64` varchar(28) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3948,7 +3950,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',18)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(24) NOT NULL
+ `to_base64` varchar(24) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3969,7 +3971,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',17)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(24) NOT NULL
+ `to_base64` varchar(24) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -3990,7 +3992,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',16)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(24) NOT NULL
+ `to_base64` varchar(24) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4011,7 +4013,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',15)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(20) NOT NULL
+ `to_base64` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4032,7 +4034,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',14)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(20) NOT NULL
+ `to_base64` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4053,7 +4055,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',13)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(20) NOT NULL
+ `to_base64` varchar(20) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4074,7 +4076,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',12)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(16) NOT NULL
+ `to_base64` varchar(16) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4095,7 +4097,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',11)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(16) NOT NULL
+ `to_base64` varchar(16) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4116,7 +4118,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',10)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(16) NOT NULL
+ `to_base64` varchar(16) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4137,7 +4139,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',9)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(12) NOT NULL
+ `to_base64` varchar(12) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4158,7 +4160,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',8)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(12) NOT NULL
+ `to_base64` varchar(12) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4179,7 +4181,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',7)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(12) NOT NULL
+ `to_base64` varchar(12) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4200,7 +4202,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',6)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(8) NOT NULL
+ `to_base64` varchar(8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4221,7 +4223,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',5)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(8) NOT NULL
+ `to_base64` varchar(8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4242,7 +4244,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',4)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(8) NOT NULL
+ `to_base64` varchar(8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4263,7 +4265,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',3)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(4) NOT NULL
+ `to_base64` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4284,7 +4286,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',2)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(4) NOT NULL
+ `to_base64` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4305,7 +4307,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',1)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` varchar(4) NOT NULL
+ `to_base64` varchar(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
@@ -4326,7 +4328,7 @@ CREATE TABLE t1 AS SELECT TO_BASE64(REPEAT('a',0)) AS to_base64;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `to_base64` char(0) NOT NULL
+ `to_base64` char(0) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
SELECT to_base64, LENGTH(to_base64) FROM t1;
to_base64 LENGTH(to_base64)
diff --git a/mysql-test/r/func_system.result b/mysql-test/r/func_system.result
index 2fc0a59f5d2..06fb7e44cf0 100644
--- a/mysql-test/r/func_system.result
+++ b/mysql-test/r/func_system.result
@@ -47,7 +47,7 @@ show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`database()` varchar(34) CHARACTER SET utf8 DEFAULT NULL,
- `user()` varchar(141) CHARACTER SET utf8 NOT NULL,
+ `user()` varchar(141) CHARACTER SET utf8 DEFAULT NULL,
`version` char(60) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
@@ -61,8 +61,8 @@ create table t1 select charset(_utf8'a'), collation(_utf8'a');
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `charset(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL,
- `collation(_utf8'a')` varchar(64) CHARACTER SET utf8 NOT NULL
+ `charset(_utf8'a')` varchar(64) CHARACTER SET utf8 DEFAULT NULL,
+ `collation(_utf8'a')` varchar(64) CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
select TRUE,FALSE,NULL;
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index f999061e2e7..08fe56d162f 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -160,7 +160,9 @@ select _koi8r'a' COLLATE koi8r_general_ci LIKE _koi8r'A' COLLATE koi8r_bin;
ERROR HY000: Illegal mix of collations (koi8r_general_ci,EXPLICIT) and (koi8r_bin,EXPLICIT) for operation 'like'
select _koi8r'a' LIKE _latin1'A';
ERROR HY000: Illegal mix of collations (koi8r_general_ci,COERCIBLE) and (latin1_swedish_ci,COERCIBLE) for operation 'like'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( faq_group_id int(11) NOT NULL default '0', faq_id int(11) NOT NULL default '0', title varchar(240) default NULL, keywords text, description longblob, solution longblob, status tinyint(4) NOT NULL default '0', access_id smallint(6) default NULL, lang_id smallint(6) NOT NULL default '0', created datetime NOT NULL default '0000-00-00 00:00:00', updated datetime default NULL, last_access datetime default NULL, last_notify datetime default NULL, solved_count int(11) NOT NULL default '0', static_solved int(11) default NULL, solved_1 int(11) default NULL, solved_2 int(11) default NULL, solved_3 int(11) default NULL, solved_4 int(11) default NULL, solved_5 int(11) default NULL, expires datetime default NULL, notes text, assigned_to smallint(6) default NULL, assigned_group smallint(6) default NULL, last_edited_by smallint(6) default NULL, orig_ref_no varchar(15) binary default NULL, c$fundstate smallint(6) default NULL, c$contributor smallint(6) default NULL, UNIQUE KEY t1$faq_id (faq_id), KEY t1$group_id$faq_id (faq_group_id,faq_id), KEY t1$c$fundstate (c$fundstate) ) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (82,82,'How to use the DynaVox Usage Counts Feature','usages count, number, corner, white, box, button','<as-html>\r\n<table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n <td width=\"97%\">\r\n <h3><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000000\">How \r\n To</font><!-- #BeginEditable \"CS_troubleshoot_question\" --><font face=\"Verdana, Arial, Helvetica, sans-serif\" color=\"#000099\"><font color=\"#000000\">: \r\n Display or Hide the Usage Counts to find out how many times each button is being selected. </font></font><!-- #EndEditable --></h3>\r\n </td>\r\n </tr>\r\n</table>','<as-html>\r\n <table width=\"100%\" border=\"0\">\r\n <tr>\r\n <td width=\"3%\"> </td>\r\n \r\n<td width=\"97%\"><!-- #BeginEditable \"CS_troubleshoot_answer\" --> \r\n \r\n<p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">1. Select \r\n the <i>On/Setup</i> button to access the DynaVox Setup Menu.<br>\r\n 2. Select <b>Button Features.</b><br>\r\n 3. Below the <b>OK</b> button is the <b>Usage Counts</b> button.<br>\r\n a. If it says \"Hidden\" then the Usage Counts will not be displayed.<br>\r\n b. If it says \"Displayed\" then the Usage Counts will be shown.<br>\r\n c. Select the <b>Usage Counts</b> Option Ring once and it will toggle \r\n to the alternative option.<br>\r\n 4. Once the correct setting has been chosen, select <b>OK</b> to leave the <i>Button \r\n Features</i> menu.<br>\r\n 5. Select <b>OK</b> out of the <i>Setup</i> menu and return to the communication \r\n page.</font></p>\r\n <p><font color=\"#000000\" face=\"Verdana, Arial, Helvetica, sans-serif\">For \r\n further information on <i>Usage Counts,</i> see the <i>Button Features \r\n Menu Entry</i> in the DynaVox/DynaMyte Reference Manual.</font></p>\r\n<!-- #EndEditable --></td>\r\n </tr>\r\n</table>',4,1,1,'2001-11-16 16:43:34','2002-11-25 12:09:43','2003-07-24 01:04:48',NULL,11,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,11,NULL,NULL,NULL);
CREATE TABLE t2 ( access_id smallint(6) NOT NULL default '0', name varchar(20) binary default NULL, rank smallint(6) NOT NULL default '0', KEY t2$access_id (access_id) ) ENGINE=MyISAM;
INSERT INTO t2 VALUES (1,'Everyone',2),(2,'Help',3),(3,'Customer Support',1);
@@ -185,12 +187,18 @@ select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
select (12%0) <=> null as '1';
1
1
+Warnings:
+Warning 1365 Division by 0
select (12%0) is null as '1';
1
1
+Warnings:
+Warning 1365 Division by 0
select 12%0 as 'NULL';
NULL
NULL
+Warnings:
+Warning 1365 Division by 0
select 12%2 as '0';
0
0
@@ -215,12 +223,18 @@ NULL
select (12 mod 0) <=> null as '1';
1
1
+Warnings:
+Warning 1365 Division by 0
select (12 mod 0) is null as '1';
1
1
+Warnings:
+Warning 1365 Division by 0
select 12 mod 0 as 'NULL';
NULL
NULL
+Warnings:
+Warning 1365 Division by 0
select 12 mod 2 as '0';
0
0
@@ -242,9 +256,13 @@ NULL
select mod(12.0, 0) as 'NULL';
NULL
NULL
+Warnings:
+Warning 1365 Division by 0
select mod(12, 0.0) as 'NULL';
NULL
NULL
+Warnings:
+Warning 1365 Division by 0
select mod(12, NULL) as 'NULL';
NULL
NULL
diff --git a/mysql-test/r/func_time.result b/mysql-test/r/func_time.result
index 4d0a2a021f9..e8cb3c58f9b 100644
--- a/mysql-test/r/func_time.result
+++ b/mysql-test/r/func_time.result
@@ -483,7 +483,9 @@ drop table t1;
create table t1 (id int);
create table t2 (id int, date date);
insert into t1 values (1);
-insert into t2 values (1, "0000-00-00");
+insert ignore into t2 values (1, "0000-00-00");
+Warnings:
+Warning 1264 Out of range value for column 'date' at row 1
insert into t1 values (2);
insert into t2 values (2, "2000-01-01");
select monthname(date) from t1 inner join t2 on t1.id = t2.id;
@@ -509,7 +511,11 @@ Warnings:
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");
+insert ignore into t1 values ("0000-00-00", "0000-00-00", "0000-00-00", "0000-00-00");
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 1
+Warning 1264 Out of range value for column 'dt' at row 1
+Warning 1265 Data truncated for column 't' at row 1
select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1;
dayofyear("0000-00-00") dayofyear(d) dayofyear(dt) dayofyear(t) dayofyear(c)
NULL NULL NULL NULL NULL
@@ -552,7 +558,9 @@ extract(MONTH FROM "0000-00-00") extract(MONTH FROM d) extract(MONTH FROM dt) ex
drop table t1;
CREATE TABLE t1 ( start datetime default NULL);
INSERT INTO t1 VALUES ('2002-10-21 00:00:00'),('2002-10-28 00:00:00'),('2002-11-04 00:00:00');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 ( ctime1 timestamp NOT NULL, ctime2 timestamp NOT NULL);
+SET sql_mode = DEFAULT;
INSERT INTO t2 VALUES (20021029165106,20021105164731);
CREATE TABLE t3 (ctime1 char(19) NOT NULL, ctime2 char(19) NOT NULL);
INSERT INTO t3 VALUES ("2002-10-29 16:51:06","2002-11-05 16:47:31");
@@ -887,16 +895,25 @@ DROP TABLE t1;
select last_day('2005-00-00');
last_day('2005-00-00')
NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2005-00-00'
select last_day('2005-00-01');
last_day('2005-00-01')
NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2005-00-01'
select last_day('2005-01-00');
last_day('2005-01-00')
-2005-01-31
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '2005-01-00'
select monthname(str_to_date(null, '%m')), monthname(str_to_date(null, '%m')),
monthname(str_to_date(1, '%m')), monthname(str_to_date(0, '%m'));
monthname(str_to_date(null, '%m')) monthname(str_to_date(null, '%m')) monthname(str_to_date(1, '%m')) monthname(str_to_date(0, '%m'))
-NULL NULL January NULL
+NULL NULL NULL NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
+Warning 1411 Incorrect datetime value: '0' for function str_to_date
set time_zone='-6:00';
create table t1(a timestamp);
insert into t1 values (19691231190001);
@@ -1031,7 +1048,7 @@ EXTRACT(HOUR FROM '10000:02:03')
Warnings:
Warning 1292 Truncated incorrect time value: '10000:02:03'
CREATE TABLE t1(f1 TIME);
-INSERT INTO t1 VALUES('916:00:00 a');
+INSERT IGNORE INTO t1 VALUES('916:00:00 a');
Warnings:
Warning 1265 Data truncated for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 1
@@ -1090,6 +1107,8 @@ H
select last_day('0000-00-00');
last_day('0000-00-00')
NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
select isnull(week(now() + 0)), isnull(week(now() + 0.2)),
week(20061108), week(20061108.01), week(20061108085411.000002);
isnull(week(now() + 0)) isnull(week(now() + 0.2)) week(20061108) week(20061108.01) week(20061108085411.000002)
@@ -1229,8 +1248,7 @@ select str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute;
str_to_date("1997-00-04 22:23:00","%Y-%m-%D") + interval 10 minute
NULL
Warnings:
-Warning 1292 Truncated incorrect date value: '1997-00-04 22:23:00'
-Warning 1292 Incorrect datetime value: '1997-00-04'
+Warning 1411 Incorrect datetime value: '1997-00-04 22:23:00' for function str_to_date
create table t1 (field DATE);
insert into t1 values ('2006-11-06');
select * from t1 where field < '2006-11-06 04:08:36.0';
@@ -1381,7 +1399,9 @@ DROP TABLE t1;
#
SELECT STR_TO_DATE(SPACE(2),'1');
STR_TO_DATE(SPACE(2),'1')
-0000-00-00
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: ' ' for function str_to_date
#
# Bug#11765216 58154: UNINITIALIZED VARIABLE FORMAT IN STR_TO_DATE FUNCTION
#
@@ -1432,11 +1452,12 @@ Warning 1292 Incorrect datetime value: '0000-00-00'
#
DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
Warnings:
-Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0'
#
# BUG#13458237 INCONSISTENT HANDLING OF INVALIDE DATES WITH ZERO DAY
# SIMILAR TO '2009-10-00'
#
+set sql_mode = '';
SELECT
DATE('20091000'),
STR_TO_DATE('200910','%Y%m'),
@@ -1665,6 +1686,7 @@ Message Incorrect datetime value: '0000-01-00'
Level Warning
Code 1411
Message Incorrect datetime value: '000001' for function str_to_date
+set sql_mode = default;
End of 5.1 tests
#
# Bug#57039: constant subtime expression returns incorrect result.
@@ -1699,7 +1721,9 @@ ERROR 42000: Variable 'storage_engine' can't be set to the value of 'NULL'
SET time_zone='+03:00';
CREATE TABLE t1 (a DATETIME NOT NULL);
INSERT INTO t1 VALUES ('2009-09-20 07:32:39.06');
-INSERT INTO t1 VALUES ('0000-00-00 00:00:00.00');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 00:00:00.00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT CAST(UNIX_TIMESTAMP(a) AS DECIMAL(25,3)) AS c1 FROM v1 ORDER BY 1;
c1
@@ -1879,10 +1903,18 @@ select last_day(f2) from t1;
last_day(f2)
NULL
NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 1
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 2
select last_day(f2) from t1 where last_day(f2) is null;
last_day(f2)
NULL
NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 1
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 1
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 2
+Warning 1292 Incorrect datetime value: '0' for column 'f2' at row 2
select * from t1 order by last_day (f2);
f2
0
@@ -1904,12 +1936,15 @@ f1 f2
5 2011-05-05
drop table t1;
create table t1 (f1 timestamp);
-insert into t1 values ('0000-00-00 00:00:00');
+insert ignore into t1 values ('0000-00-00 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'f1' at row 1
select least(1, f1) from t1;
least(1, f1)
-0000-00-00 00:00:00
+NULL
Warnings:
Warning 1292 Incorrect datetime value: '1'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
drop table t1;
SET timestamp=UNIX_TIMESTAMP('2014-04-14 10:10:10');
select now() > coalesce(time('21:43:24'), date('2010-05-03'));
@@ -1925,7 +1960,9 @@ select * from t1 where f1 > f1 and f1 <=> timestampadd(hour, 9 , '2010-01-01 16:
f1
drop table t1;
create table t1 (f1 date);
-insert into t1 values ('0000-00-00');
+insert ignore into t1 values ('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
select timestampadd(week, 1, f1) from t1;
timestampadd(week, 1, f1)
NULL
@@ -1939,9 +1976,14 @@ Warning 1292 Incorrect datetime value: '0000-00-00'
drop table t1;
create table t1 (f2 time not null, f3 datetime, f4 int not null, f5 timestamp);
insert ignore t1 values ('04:38:11','0000-00-00 00:00:00',0,'0000-00-00 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'f3' at row 1
+Warning 1265 Data truncated for column 'f5' at row 1
select least(greatest(f3, f2, f4), f5) from t1;
least(greatest(f3, f2, f4), f5)
-0000-00-00 00:00:00
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
drop table t1;
select day(coalesce(null));
day(coalesce(null))
@@ -1950,7 +1992,9 @@ select timestamp(greatest('2002-08-20', '0000-00-00 00:00:00'));
timestamp(greatest('2002-08-20', '0000-00-00 00:00:00'))
2002-08-20 00:00:00
create table t1 (f1 datetime);
-insert into t1 values ('0000-00-00 00:00:00');
+insert ignore into t1 values ('0000-00-00 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
select cast(f1 AS time) from t1;
cast(f1 AS time)
00:00:00
@@ -1958,19 +2002,34 @@ drop table t1;
SET timestamp=UNIX_TIMESTAMP('2014-06-01 10:20:30');
select greatest(cast("0-0-0" as date), cast("10:20:05" as time));
greatest(cast("0-0-0" as date), cast("10:20:05" as time))
-2014-06-01 10:20:05
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0-0-0'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '0000-00-00';
greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '0000-00-00'
-0
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0-0-0'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01';
greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01'
-0
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0-0-0'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
select greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01 10:20:05';
greatest(cast("0-0-0" as date), cast("10:20:05" as time)) = '2014-06-01 10:20:05'
-1
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0-0-0'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
select cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6));
cast(greatest(cast("0-0-0" as date), cast("10:20:05" as time)) as datetime(6))
-2014-06-01 10:20:05.000000
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '0-0-0'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
SET timestamp=DEFAULT;
select microsecond('12:00:00.123456'), microsecond('2009-12-31 23:59:59.000010');
microsecond('12:00:00.123456') microsecond('2009-12-31 23:59:59.000010')
@@ -2145,10 +2204,12 @@ f2
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410'
Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410'
Warning 1292 Truncated incorrect DECIMAL value: '2005-05-0410'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/r/function_defaults.result b/mysql-test/r/function_defaults.result
index 4b8694ec838..a0a8df4ba8f 100644
--- a/mysql-test/r/function_defaults.result
+++ b/mysql-test/r/function_defaults.result
@@ -5,6 +5,7 @@
# Function defaults run 1. No microsecond precision.
#
SET TIME_ZONE = "+00:00";
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
#
# Test of errors for column data types that dont support function
# defaults.
@@ -1547,10 +1548,12 @@ a b
1999-12-01 11:22:33 1999-12-01 11:22:33
2001-09-09 04:46:40 2001-09-09 04:46:40
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Function defaults run 2. Six digits scale on seconds precision.
#
SET TIME_ZONE = "+00:00";
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
#
# Test of errors for column data types that dont support function
# defaults.
@@ -3093,3 +3096,4 @@ a b
1999-12-01 11:22:33.000000 1999-12-01 11:22:33.000000
2001-09-09 04:46:40.000000 2001-09-09 04:46:40.000000
DROP TABLE t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/r/function_defaults_innodb.result b/mysql-test/r/function_defaults_innodb.result
index fe97870ab88..4dc353e2663 100644
--- a/mysql-test/r/function_defaults_innodb.result
+++ b/mysql-test/r/function_defaults_innodb.result
@@ -6,6 +6,7 @@ set default_storage_engine=innodb;
# Function defaults run 1. No microsecond precision.
#
SET TIME_ZONE = "+00:00";
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
#
# Test of errors for column data types that dont support function
# defaults.
@@ -1548,10 +1549,12 @@ a b
1999-12-01 11:22:33 1999-12-01 11:22:33
2001-09-09 04:46:40 2001-09-09 04:46:40
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Function defaults run 2. Six digits scale on seconds precision.
#
SET TIME_ZONE = "+00:00";
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
#
# Test of errors for column data types that dont support function
# defaults.
@@ -3094,3 +3097,4 @@ a b
1999-12-01 11:22:33.000000 1999-12-01 11:22:33.000000
2001-09-09 04:46:40.000000 2001-09-09 04:46:40.000000
DROP TABLE t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/r/get_diagnostics.result b/mysql-test/r/get_diagnostics.result
index 6ea2d150185..029de086106 100644
--- a/mysql-test/r/get_diagnostics.result
+++ b/mysql-test/r/get_diagnostics.result
@@ -615,6 +615,7 @@ DROP PROCEDURE p1;
# Message is truncated to fit into target. No truncation warning.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE PROCEDURE p1()
BEGIN
DECLARE v CHAR(1);
@@ -630,6 +631,7 @@ Warnings:
Note 1050 Table 't1' already exists
DROP TABLE t1;
DROP PROCEDURE p1;
+SET sql_mode = DEFAULT;
# Returns number of rows updated by the UPDATE statements.
diff --git a/mysql-test/r/gis-rtree.result b/mysql-test/r/gis-rtree.result
index 43c51b838e2..b76d02ef1d7 100644
--- a/mysql-test/r/gis-rtree.result
+++ b/mysql-test/r/gis-rtree.result
@@ -800,7 +800,7 @@ drop table t1;
CREATE TABLE t1 (st varchar(100));
INSERT INTO t1 VALUES ("Fake string");
CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom));
-INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
+INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -1453,7 +1453,7 @@ drop table t1;
CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
INSERT INTO t1(foo) VALUES (NULL);
ERROR 23000: Column 'foo' cannot be null
-INSERT INTO t1() VALUES ();
+INSERT IGNORE INTO t1() VALUES ();
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
INSERT INTO t1(foo) VALUES ('');
ERROR 22003: Cannot get geometry object from data you send to the GEOMETRY field
diff --git a/mysql-test/r/gis.result b/mysql-test/r/gis.result
index ed0d8f540a0..e9bc6053ff9 100644
--- a/mysql-test/r/gis.result
+++ b/mysql-test/r/gis.result
@@ -760,7 +760,9 @@ a
NULL
DROP TABLE t1;
CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
-INSERT INTO `t1` VALUES ('','0000-00-00');
+INSERT IGNORE INTO `t1` VALUES ('','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'col89' at row 1
select geomfromtext(col9,col89) as a from t1;
a
NULL
@@ -807,7 +809,7 @@ drop procedure if exists fn3;
create function fn3 () returns point deterministic return GeomFromText("point(1 1)");
show create function fn3;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-fn3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point
+fn3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `fn3`() RETURNS point
DETERMINISTIC
return GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci
select astext(fn3());
@@ -1616,8 +1618,8 @@ insert into t1 values(geomfromtext("POINT(0 9.2233720368548e18)"));
select equals(`a`,convert(`a` using utf8)) from `t1`;
equals(`a`,convert(`a` using utf8))
1
-0
-0
+NULL
+NULL
Warnings:
Warning 1300 Invalid utf8 character string: '\xE0C'
Warning 1300 Invalid utf8 character string: '\xE0C'
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 8788114583d..b57ef5a0fdc 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -8,10 +8,18 @@ score smallint(5) unsigned,
lsg char(40),
date date
);
-INSERT INTO t1 VALUES (1,1,1,'','0000-00-00');
-INSERT INTO t1 VALUES (2,2,2,'','0000-00-00');
-INSERT INTO t1 VALUES (2,1,1,'','0000-00-00');
-INSERT INTO t1 VALUES (3,3,3,'','0000-00-00');
+INSERT IGNORE INTO t1 VALUES (1,1,1,'','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'date' at row 1
+INSERT IGNORE INTO t1 VALUES (2,2,2,'','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'date' at row 1
+INSERT IGNORE INTO t1 VALUES (2,1,1,'','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'date' at row 1
+INSERT IGNORE INTO t1 VALUES (3,3,3,'','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'date' at row 1
CREATE TABLE t2 (
userID int(10) unsigned NOT NULL auto_increment,
niName char(15),
@@ -58,6 +66,7 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 4 Using where; Using temporary
1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.userID 1 Using index
drop table t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
PID int(10) unsigned NOT NULL auto_increment,
payDate date DEFAULT '0000-00-00' NOT NULL,
@@ -77,6 +86,7 @@ KEY reason (reason),
KEY method (method),
KEY payDate (payDate)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (1,'1970-01-01','1997-10-17 00:00:00',2529,1,21000,11886,'check',0,'F',16200,6);
SELECT COUNT(P.URID),SUM(P.amount),P.method, MIN(PP.recdate+0) > 19980501000000 AS IsNew FROM t1 AS P JOIN t1 as PP WHERE P.URID = PP.URID GROUP BY method,IsNew;
ERROR 42000: Can't group on 'IsNew'
@@ -110,6 +120,7 @@ cid CONCAT(firstname, ' ', surname) COUNT(call_id)
drop table t2;
unlock tables;
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
bug_id mediumint(9) NOT NULL auto_increment,
groupset bigint(20) DEFAULT '0' NOT NULL,
@@ -150,6 +161,7 @@ KEY target_milestone (target_milestone),
KEY qa_contact (qa_contact),
KEY votes (votes)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (1,0,0,'','normal','','2000-02-10 09:25:12',20000321114747,'','','Linux','P1','TestProduct','PC',3,'other','TestComponent','','M1',0,'',0);
INSERT INTO t1 VALUES (9,0,0,'','enhancement','','2000-03-10 11:49:36',20000321114747,'','','All','P5','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
INSERT INTO t1 VALUES (10,0,0,'','enhancement','','2000-03-10 18:10:16',20000321114747,'','','All','P4','AAAAA','PC',3,'2.00 CD - Pre','BBBBBBBBBBBBB - conversion','','',0,'',0);
@@ -2550,9 +2562,13 @@ ERROR 42S22: Unknown column 'y' in 'order clause'
CREATE TABLE t1 (f1 int, f2 DATE);
INSERT INTO t1 VALUES (1,'2004-04-19'), (1,'0000-00-00'), (1,'2004-04-18'),
(2,'2004-05-19'), (2,'0001-01-01'), (3,'2004-04-10');
+Warnings:
+Warning 1264 Out of range value for column 'f2' at row 2
SELECT MIN(f2),MAX(f2) FROM t1;
MIN(f2) MAX(f2)
-0000-00-00 2004-05-19
+NULL 2004-05-19
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00'
SELECT f1,MIN(f2),MAX(f2) FROM t1 GROUP BY 1;
f1 MIN(f2) MAX(f2)
1 0000-00-00 2004-04-19
diff --git a/mysql-test/r/having.result b/mysql-test/r/having.result
index c008f6b4d13..18fb5e2de72 100644
--- a/mysql-test/r/having.result
+++ b/mysql-test/r/having.result
@@ -370,7 +370,7 @@ select * from t1 a, t1 b group by a.s1 having s1 is null;
ERROR 23000: Column 's1' in having clause is ambiguous
drop table t1;
create table t1 (s1 char character set latin1 collate latin1_german1_ci);
-insert into t1 values ('Ì'),('y');
+insert ignore into t1 values ('Ì'),('y');
Warnings:
Warning 1265 Data truncated for column 's1' at row 1
select s1,count(s1) from t1
diff --git a/mysql-test/r/help.result b/mysql-test/r/help.result
index aefe6f8381e..66850e75dc1 100644
--- a/mysql-test/r/help.result
+++ b/mysql-test/r/help.result
@@ -1,46 +1,46 @@
-insert into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1');
+insert ignore into mysql.help_category(help_category_id,name)values(10001,'impossible_category_1');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category1_id:= 10001;
@category1_id:= 10001
10001
-insert into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2');
+insert ignore into mysql.help_category(help_category_id,name)values(10002,'impossible_category_2');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category2_id:= 10002;
@category2_id:= 10002
10002
-insert into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id);
+insert ignore into mysql.help_category(help_category_id,name,parent_category_id)values(10003,'impossible_category_3',@category2_id);
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @category3_id:= 10003;
@category3_id:= 10003
10003
-insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1');
+insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10101,'impossible_function_1',@category1_id,'description of \n impossible_function1\n','example of \n impossible_function1');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic1_id:= 10101;
@topic1_id:= 10101
10101
-insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2');
+insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10102,'impossible_function_2',@category1_id,'description of \n impossible_function2\n','example of \n impossible_function2');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic2_id:= 10102;
@topic2_id:= 10102
10102
-insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3');
+insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10103,'impossible_function_3',@category2_id,'description of \n impossible_function3\n','example of \n impossible_function3');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic3_id:= 10103;
@topic3_id:= 10103
10103
-insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4');
+insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10104,'impossible_function_4',@category2_id,'description of \n impossible_function4\n','example of \n impossible_function4');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic4_id:= 10104;
@topic4_id:= 10104
10104
-insert into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7');
+insert ignore into mysql.help_topic(help_topic_id,name,help_category_id,description,example)values(10105,'impossible_function_7',@category3_id,'description of \n impossible_function5\n','example of \n impossible_function7');
Warnings:
Warning 1364 Field 'url' doesn't have a default value
select @topic5_id:= 10105;
diff --git a/mysql-test/r/innodb_icp.result b/mysql-test/r/innodb_icp.result
index abc41244c7d..881a614fe3f 100644
--- a/mysql-test/r/innodb_icp.result
+++ b/mysql-test/r/innodb_icp.result
@@ -65,7 +65,10 @@ PRIMARY KEY(c1),
UNIQUE(c2)
);
-INSERT INTO t1 VALUES('0000-00-00', '0000-00-00', '2008-01-04', '2008-01-05');
+INSERT IGNORE INTO t1 VALUES('0000-00-00', '0000-00-00', '2008-01-04', '2008-01-05');
+Warnings:
+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('2007-05-25', '2007-05-25', '2007-05-26', '2007-05-26');
INSERT INTO t1 VALUES('2008-01-01', NULL , '2008-01-02', '2008-01-03');
INSERT INTO t1 VALUES('2008-01-17', NULL , NULL , '2009-01-29');
@@ -95,7 +98,7 @@ c4 DATETIME,
PRIMARY KEY(c1),
UNIQUE INDEX(c2)
);
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
('0000-00-00 00:00:00','0000-00-00 00:00:00','2008-01-04','2008-01-05 00:00:00'),
('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02 00:00:00'),
('1999-01-01 00:00:00','1999-01-01 00:00:00', NULL, NULL),
@@ -104,6 +107,9 @@ INSERT INTO t1 VALUES
('2008-01-01 00:00:00', NULL, '2008-01-02','2008-01-03 00:00:00'),
('2009-01-29 11:11:27','2009-01-29 11:11:27','2009-01-29','2009-01-29 11:11:27'),
('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'c1' at row 1
+Warning 1265 Data truncated for column 'c2' at row 1
SELECT *
FROM t1
@@ -474,7 +480,7 @@ CREATE TABLE t2 (
t2_int int PRIMARY KEY,
t2_int2 INT
);
-INSERT INTO t2 VALUES ();
+INSERT IGNORE INTO t2 VALUES ();
INSERT INTO t1 VALUES ();
SELECT * FROM t1 AS t1a
WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
@@ -568,7 +574,7 @@ COL1000 VARBINARY(179) NOT NULL,
col1003 DATE DEFAULT NULL,
KEY idx4267 (col1000, col1003)
);
-INSERT INTO t1 VALUES (),();
+INSERT IGNORE INTO t1 VALUES (),();
Warnings:
Warning 1364 Field 'col999' doesn't have a default value
Warning 1364 Field 'COL1000' doesn't have a default value
@@ -849,7 +855,7 @@ Handler_icp_attempts 2
Handler_icp_match 1
DROP TABLE t1;
create table t1 (a int,b char(5),primary key (a), key (b(1)));
-insert into t1 values ('a','b');
+insert ignore into t1 values ('a','b');
Warnings:
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
select 1 from t1 where a and b >= 'aa';
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 22d514f2df2..40f0ab341c3 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -22,6 +22,8 @@ insert into t1 values (0,"r1man");
drop table t1;
create table t1 (a int not null auto_increment, primary key (a), t timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, c char(10) default "hello", i int);
insert into t1 values (default,default,default,default), (default,default,default,default), (4,0,"a",5),(default,default,default,default);
+Warnings:
+Warning 1265 Data truncated for column 't' at row 3
select a,t>0,c,i from t1;
a t>0 c i
1 1 hello NULL
@@ -31,8 +33,12 @@ a t>0 c i
truncate table t1;
insert into t1 set a=default,t=default,c=default;
insert into t1 set a=default,t=default,c=default,i=default;
-insert into t1 set a=4,t=0,c="a",i=5;
-insert into t1 set a=5,t=0,c="a",i=null;
+insert ignore into t1 set a=4,t=0,c="a",i=5;
+Warnings:
+Warning 1265 Data truncated for column 't' at row 1
+insert ignore into t1 set a=5,t=0,c="a",i=null;
+Warnings:
+Warning 1265 Data truncated for column 't' at row 1
insert into t1 set a=default,t=default,c=default,i=default;
select a,t>0,c,i from t1;
a t>0 c i
@@ -90,7 +96,7 @@ drop database mysqltest;
use test;
create table t1(number int auto_increment primary key, original_value varchar(50), f_double double, f_float float, f_double_7_2 double(7,2), f_float_4_3 float (4,3), f_double_u double unsigned, f_float_u float unsigned, f_double_15_1_u double(15,1) unsigned, f_float_3_1_u float (3,1) unsigned);
set @value= "aa";
-insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1366 Incorrect double value: 'aa' for column 'f_double' at row 1
Warning 1366 Incorrect double value: 'aa' for column 'f_float' at row 1
@@ -112,7 +118,7 @@ f_float_u 0
f_double_15_1_u 0.0
f_float_3_1_u 0.0
set @value= "1aa";
-insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
+insert ignore 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
@@ -134,7 +140,7 @@ f_float_u 1
f_double_15_1_u 1.0
f_float_3_1_u 1.0
set @value= "aa1";
-insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
Warning 1366 Incorrect double value: 'aa1' for column 'f_double' at row 1
Warning 1366 Incorrect double value: 'aa1' for column 'f_float' at row 1
@@ -156,7 +162,7 @@ f_float_u 0
f_double_15_1_u 0.0
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);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
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
@@ -184,7 +190,7 @@ f_float_u 3.40282e38
f_double_15_1_u 99999999999999.9
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);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
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
@@ -217,7 +223,7 @@ ERROR 22007: Illegal double '1e+1111111111' value found during parsing
set @value= -1e+1111111111;
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);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
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
@@ -237,7 +243,7 @@ f_float_u 3.40282e38
f_double_15_1_u 99999999999999.9
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);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
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
@@ -271,7 +277,7 @@ f_float_u 1
f_double_15_1_u 1.0
f_float_3_1_u 1.0
set @value= -1;
-insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
+insert ignore into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@value,@value);
Warnings:
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
@@ -515,7 +521,7 @@ b char(7) DEFAULT NULL,
c char(4) DEFAULT NULL
);
INSERT INTO t1(a,b,c) VALUES (9.999999e+0, 9.999999e+0, 9.999e+0);
-INSERT INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
+INSERT IGNORE INTO t1(a,b,c) VALUES (1.225e-05, 1.225e-05, 1.225e-05);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
@@ -534,7 +540,7 @@ INSERT INTO t1(a,b) VALUES (1.25e-175, 1.25e-175);
INSERT INTO t1(a,c) VALUES (1.225e+0, 1.225e+0);
INSERT INTO t1(a,c) VALUES (1.37e+0, 1.37e+0);
INSERT INTO t1(a,c) VALUES (-1.37e+0, -1.37e+0);
-INSERT INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
+INSERT IGNORE INTO t1(a,c) VALUES (1.87e-3, 1.87e-3);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
diff --git a/mysql-test/r/insert_select.result b/mysql-test/r/insert_select.result
index 3f4a26a728e..1948b503248 100644
--- a/mysql-test/r/insert_select.result
+++ b/mysql-test/r/insert_select.result
@@ -25,6 +25,7 @@ payoutID
20
22
drop table t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`numeropost` bigint(20) unsigned NOT NULL default '0',
`icone` tinyint(4) unsigned NOT NULL default '0',
@@ -40,6 +41,8 @@ KEY `date` (`date`),
KEY `pseudo` (`pseudo`),
KEY `numreponse` (`numreponse`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`numeropost` bigint(20) unsigned NOT NULL default '0',
`icone` tinyint(4) unsigned NOT NULL default '0',
@@ -55,6 +58,7 @@ KEY `date` (`date`),
KEY `pseudo` (`pseudo`),
KEY `numreponse` (`numreponse`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t2
(numeropost,icone,numreponse,contenu,pseudo,date,ip,signature) VALUES
(9,1,56,'test','joce','2001-07-25 13:50:53'
@@ -608,7 +612,7 @@ NULL Field Count
NULL 1 100
NULL 2 100
create table t2(No int not null, Field int not null, Count int not null);
-insert into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
+insert ignore into t2 Select null, Field, Count From t1 Where Month=20030901 and Type=2;
Warnings:
Warning 1048 Column 'No' cannot be null
Warning 1048 Column 'No' cannot be null
@@ -772,11 +776,13 @@ f1 f2
101 1
2 2
DROP TABLE t1, t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( a INT KEY, b INT );
INSERT INTO t1 VALUES ( 0, 1 );
INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2;
ERROR 23000: Duplicate entry '0' for key 'PRIMARY'
DROP TABLE t1;
+SET sql_mode = DEFAULT;
SET SQL_MODE='STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c VARCHAR(30), INDEX ix_c (c(10)));
CREATE TABLE t2 (d VARCHAR(10));
diff --git a/mysql-test/r/join.result b/mysql-test/r/join.result
index 61a78e65610..5704859fda4 100644
--- a/mysql-test/r/join.result
+++ b/mysql-test/r/join.result
@@ -71,6 +71,7 @@ explain select t1.id, t2.id from t1, t2 where t2.id = t1.id and t1.id <0 and t1.
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
drop table t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
token varchar(100) DEFAULT '' NOT NULL,
@@ -83,6 +84,7 @@ KEY token (token(15)),
KEY timestamp (timestamp),
UNIQUE token_2 (token(75),count,phone)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (21,'e45703b64de71482360de8fec94c3ade',3,7800,'n','1999-12-23 17:22:21');
INSERT INTO t1 VALUES (22,'e45703b64de71482360de8fec94c3ade',4,5000,'y','1999-12-23 17:22:21');
INSERT INTO t1 VALUES (18,'346d1cb63c89285b2351f0ca4de40eda',3,13200,'b','1999-12-23 11:58:04');
@@ -154,6 +156,8 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (d DATE NOT NULL);
CREATE TABLE t2 (d DATE NOT NULL);
INSERT INTO t1 (d) VALUES ('2001-08-01'),('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 2
SELECT * FROM t1 LEFT JOIN t2 USING (d) WHERE t2.d IS NULL;
d
2001-08-01
@@ -168,6 +172,8 @@ SELECT * FROM t1 WHERE 1/0 IS NULL;
d
2001-08-01
0000-00-00
+Warnings:
+Warning 1365 Division by 0
DROP TABLE t1,t2;
CREATE TABLE t1 (
Document_ID varchar(50) NOT NULL default '',
diff --git a/mysql-test/r/join_cache.result b/mysql-test/r/join_cache.result
index 74e64d92856..a67c032153b 100644
--- a/mysql-test/r/join_cache.result
+++ b/mysql-test/r/join_cache.result
@@ -5669,6 +5669,7 @@ INSERT INTO t1 VALUES
(NULL,PointFromText('POINT(9 0)'),127,'00:00:00','0000-00-00','2012-04-04 21:26:12','2013-03-04',0.0,'12:54:30',NULL),
(NULL,PointFromText('POINT(9 0)'),1,'00:00:00','2013-05-01 22:37:49','2013-06-26','2012-09-22 17:31:03',0.0,'08:09:57','11:15:36');
Warnings:
+Warning 1264 Out of range value for column 'col284' at row 7
Note 1265 Data truncated for column 'col286' at row 7
CREATE TABLE t2 (b int) ENGINE=Aria;
INSERT INTO t2 VALUES (NULL);
diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result
index 7fb3517ecb7..99087614502 100644
--- a/mysql-test/r/join_outer.result
+++ b/mysql-test/r/join_outer.result
@@ -2144,7 +2144,10 @@ drop table t0, t1;
# (this is a regression after fix for MDEV-4817)
#
CREATE TABLE t1 (id INT, d DATE NOT NULL);
-INSERT INTO t1 VALUES (1,'0000-00-00'),(2,'0000-00-00');
+INSERT IGNORE INTO t1 VALUES (1,'0000-00-00'),(2,'0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 1
+Warning 1264 Out of range value for column 'd' at row 2
CREATE TABLE t2 (i INT);
SELECT * FROM t1 LEFT JOIN t2 ON (id=i) WHERE NULL OR d IS NULL;
id d i
@@ -2152,7 +2155,9 @@ id d i
2 0000-00-00 NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (i1 INT, d1 DATE NOT NULL);
-INSERT INTO t1 VALUES (1,'2012-12-21'),(2,'0000-00-00');
+INSERT IGNORE INTO t1 VALUES (1,'2012-12-21'),(2,'0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd1' at row 2
CREATE TABLE t2 (i2 INT, j2 INT);
INSERT INTO t2 VALUES (1,10),(2,20);
SELECT * FROM t1 LEFT JOIN t2 ON i1 = j2 WHERE d1 IS NULL AND 1 OR i1 = i2;
diff --git a/mysql-test/r/join_outer_innodb.result b/mysql-test/r/join_outer_innodb.result
index 339cc59ed69..6f3fb09329d 100644
--- a/mysql-test/r/join_outer_innodb.result
+++ b/mysql-test/r/join_outer_innodb.result
@@ -196,7 +196,7 @@ a8 smallint(6) DEFAULT NULL, a9 smallint(6) DEFAULT NULL, a10 tinyint NOT NULL,
PRIMARY KEY (a1), KEY a2 (a2), KEY a3 (a3), KEY a4 (a4), KEY a6 (a6),
KEY a5 (a5), KEY a7 (a7), KEY a8 (a8), KEY a9 (a9)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
(3360,5684,2219,1,316832,1,0,NULL,NULL,NULL),
(3362,2754,597,2,316844,1,0,NULL,NULL,NULL),
(3363,369,NULL,1,317295,1,0,NULL,NULL,NULL);
diff --git a/mysql-test/r/join_outer_jcl6.result b/mysql-test/r/join_outer_jcl6.result
index ef749768d4c..bb670daee40 100644
--- a/mysql-test/r/join_outer_jcl6.result
+++ b/mysql-test/r/join_outer_jcl6.result
@@ -2155,7 +2155,10 @@ drop table t0, t1;
# (this is a regression after fix for MDEV-4817)
#
CREATE TABLE t1 (id INT, d DATE NOT NULL);
-INSERT INTO t1 VALUES (1,'0000-00-00'),(2,'0000-00-00');
+INSERT IGNORE INTO t1 VALUES (1,'0000-00-00'),(2,'0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 1
+Warning 1264 Out of range value for column 'd' at row 2
CREATE TABLE t2 (i INT);
SELECT * FROM t1 LEFT JOIN t2 ON (id=i) WHERE NULL OR d IS NULL;
id d i
@@ -2163,7 +2166,9 @@ id d i
2 0000-00-00 NULL
DROP TABLE t1,t2;
CREATE TABLE t1 (i1 INT, d1 DATE NOT NULL);
-INSERT INTO t1 VALUES (1,'2012-12-21'),(2,'0000-00-00');
+INSERT IGNORE INTO t1 VALUES (1,'2012-12-21'),(2,'0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd1' at row 2
CREATE TABLE t2 (i2 INT, j2 INT);
INSERT INTO t2 VALUES (1,10),(2,20);
SELECT * FROM t1 LEFT JOIN t2 ON i1 = j2 WHERE d1 IS NULL AND 1 OR i1 = i2;
diff --git a/mysql-test/r/key.result b/mysql-test/r/key.result
index 913e39ee140..ba1124aaa14 100644
--- a/mysql-test/r/key.result
+++ b/mysql-test/r/key.result
@@ -32,7 +32,7 @@ KEY price (price,area,type,transityes,shopsyes,schoolsyes,petsyes)
);
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','N','N','N','N');
-INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','','');
+INSERT IGNORE INTO t1 VALUES (900,'Vancouver','Shared/Roomate','','','','');
Warnings:
Warning 1265 Data truncated for column 'transityes' at row 1
Warning 1265 Data truncated for column 'shopsyes' at row 1
@@ -157,7 +157,7 @@ t1 1 c 1 c A NULL NULL NULL YES BTREE
drop table t1;
CREATE TABLE t1 (c CHAR(10) NOT NULL,i INT NOT NULL AUTO_INCREMENT,
UNIQUE (c,i));
-INSERT INTO t1 (c) VALUES (NULL),(NULL);
+INSERT IGNORE INTO t1 (c) VALUES (NULL),(NULL);
Warnings:
Warning 1048 Column 'c' cannot be null
Warning 1048 Column 'c' cannot be null
@@ -189,10 +189,10 @@ a 1
a 2
drop table t1;
create table t1 (i int, a char(200), b text, unique (a), unique (b(300))) charset utf8;
-insert t1 values (1, repeat('a',210), repeat('b', 310));
+insert ignore t1 values (1, repeat('a',210), repeat('b', 310));
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-insert t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
+insert ignore t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select i, length(a), length(b), char_length(a), char_length(b) from t1;
diff --git a/mysql-test/r/limit_rows_examined.result b/mysql-test/r/limit_rows_examined.result
index fa979c4ec43..532448a8da8 100644
--- a/mysql-test/r/limit_rows_examined.result
+++ b/mysql-test/r/limit_rows_examined.result
@@ -628,7 +628,7 @@ INSERT/DELETE/UPDATE
INSERT ... SELECT
CREATE TABLE t4 (a int);
INSERT INTO t4 values (1), (2);
-INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0;
+INSERT IGNORE INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 0;
Warnings:
Warning 1931 Query execution was interrupted. The query examined at least 1 rows, which exceeds LIMIT ROWS EXAMINED (0). The query result may be incomplete
select * from t4;
diff --git a/mysql-test/r/loaddata.result b/mysql-test/r/loaddata.result
index d21402a336a..79d4f4a4fda 100644
--- a/mysql-test/r/loaddata.result
+++ b/mysql-test/r/loaddata.result
@@ -1,12 +1,13 @@
drop table if exists t1, t2;
create table t1 (a date, b date, c date not null, d date);
-load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',';
+load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',';
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'c' at row 1
Warning 1265 Data truncated for column 'd' at row 1
Warning 1265 Data truncated for column 'a' at row 2
Warning 1265 Data truncated for column 'b' at row 2
+Warning 1264 Out of range value for column 'c' at row 2
Warning 1265 Data truncated for column 'd' at row 2
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
SELECT * from t1;
@@ -16,11 +17,12 @@ a b c d
2003-03-03 2003-03-03 2003-03-03 NULL
2003-03-03 2003-03-03 2003-03-03 NULL
truncate table t1;
-load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
+load data infile '../../std_data/loaddata1.dat' ignore into table t1 fields terminated by ',' LINES STARTING BY ',' (b,c,d);
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
Warning 1265 Data truncated for column 'd' at row 1
Warning 1265 Data truncated for column 'b' at row 2
+Warning 1264 Out of range value for column 'c' at row 2
Warning 1265 Data truncated for column 'd' at row 2
SELECT * from t1;
a b c d
@@ -178,7 +180,7 @@ select @a, @b;
@a @b
NULL 15
truncate table t1;
-load data infile '../../std_data/rpl_loaddata.dat' into table t1 set c=b;
+load data infile '../../std_data/rpl_loaddata.dat' ignore into table t1 set c=b;
Warnings:
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1261 Row 2 doesn't contain data for all columns
@@ -581,7 +583,7 @@ C38322525420406E696F757A656368756E3A20E98198E2889AF58081AEE7B99DE4B88AE383A3E7B9
CREATE DATABASE d2 CHARSET utf8;
USE d2;
CREATE TABLE t1 (val TEXT);
-LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' INTO TABLE t1;
+LOAD DATA INFILE '../../std_data/bug20683959loaddata.txt' IGNORE INTO TABLE t1;
Warnings:
Warning 1366 Incorrect string value: '\xF5\x80\x81\xAE\xE7\xB9...' for column 'val' at row 1
SELECT COUNT(*) FROM t1;
diff --git a/mysql-test/r/loaddata_autocom_innodb.result b/mysql-test/r/loaddata_autocom_innodb.result
index c1e6b7f2fba..9f5a0809f2a 100644
--- a/mysql-test/r/loaddata_autocom_innodb.result
+++ b/mysql-test/r/loaddata_autocom_innodb.result
@@ -2,7 +2,7 @@ SET SESSION STORAGE_ENGINE = InnoDB;
drop table if exists t1;
create table t1 (id int unsigned not null auto_increment primary key, a text, b text);
start transaction;
-load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b);
+load data infile 'LOAD_FILE' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b);
Warnings:
Warning 1261 Row 3 doesn't contain data for all columns
commit;
@@ -11,7 +11,7 @@ count(*)
4
truncate table t1;
start transaction;
-load data infile 'LOAD_FILE' into table t1 fields terminated by ',' enclosed by '''' (a, b);
+load data infile 'LOAD_FILE' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b);
Warnings:
Warning 1261 Row 3 doesn't contain data for all columns
rollback;
diff --git a/mysql-test/r/merge.result b/mysql-test/r/merge.result
index eadc56ec267..2027568437d 100644
--- a/mysql-test/r/merge.result
+++ b/mysql-test/r/merge.result
@@ -2290,7 +2290,7 @@ CREATE TABLE t3(a int) ENGINE = MERGE UNION(t1, t2);
CREATE TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo();
SHOW CREATE TRIGGER tr1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo() latin1 latin1_swedish_ci latin1_swedish_ci #
+tr1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1 AFTER INSERT ON t3 FOR EACH ROW CALL foo() latin1 latin1_swedish_ci latin1_swedish_ci #
DROP TRIGGER tr1;
DROP TABLE t1, t2, t3;
#
diff --git a/mysql-test/r/mix2_myisam.result b/mysql-test/r/mix2_myisam.result
index 1ffebcd50be..b04e8c88f6f 100644
--- a/mysql-test/r/mix2_myisam.result
+++ b/mysql-test/r/mix2_myisam.result
@@ -839,6 +839,7 @@ desc t1;
Field Type Null Key Default Extra
t int(11) NO MUL 1
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -852,12 +853,18 @@ version smallint(6) NOT NULL default '0',
assigned_scps int(11) default '0',
status tinyint(4) default '0'
) ENGINE=MyISAM;
-INSERT INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t1 VALUES (4077711111,'SeanWheeler',90,2,20020111112846,500,00000000000000,-1,2,3,1);
+Warnings:
+Warning 1265 Data truncated for column 'last_app_date' at row 1
INSERT INTO t1 VALUES (9197722223,'berry',90,3,20020111112809,500,20020102114532,501,4,10,0);
-INSERT INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
+INSERT IGNORE INTO t1 VALUES (650,'San Francisco',0,0,20011227111336,342,00000000000000,-1,1,24,1);
+Warnings:
+Warning 1265 Data truncated for column 'last_app_date' at row 1
INSERT INTO t1 VALUES (302467,'Sue\'s Subshop',90,3,20020109113241,500,20020102115111,501,7,24,0);
INSERT INTO t1 VALUES (6014911113,'SudzCarwash',520,1,20020102115234,500,20020102115259,501,33,32768,0);
INSERT INTO t1 VALUES (333,'tubs',99,2,20020109113440,501,20020109113440,500,3,10,0);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -871,9 +878,14 @@ version smallint(6) NOT NULL default '0',
assigned_scps int(11) default '0',
status tinyint(4) default '0'
) ENGINE=MyISAM;
-INSERT INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 VALUES (4077711111,'SeanWheeler',0,2,20020111112853,500,00000000000000,-1,2,3,1);
+Warnings:
+Warning 1265 Data truncated for column 'last_app_date' at row 1
INSERT INTO t2 VALUES (9197722223,'berry',90,3,20020111112818,500,20020102114532,501,4,10,0);
-INSERT INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
+INSERT IGNORE INTO t2 VALUES (650,'San Francisco',90,0,20020109113158,342,00000000000000,-1,1,24,1);
+Warnings:
+Warning 1265 Data truncated for column 'last_app_date' at row 1
INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
select * from t1;
number cname carrier_id privacy last_mod_date last_mod_id last_app_date last_app_id version assigned_scps status
@@ -1988,18 +2000,22 @@ create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65536));
Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` mediumtext DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65530) character set utf8);
Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/multi_update.result b/mysql-test/r/multi_update.result
index 66f3b740079..5953f221699 100644
--- a/mysql-test/r/multi_update.result
+++ b/mysql-test/r/multi_update.result
@@ -662,11 +662,11 @@ SET SESSION sql_safe_updates = DEFAULT;
CREATE FUNCTION f1 () RETURNS BLOB RETURN 1;
CREATE TABLE t1 (f1 DATE);
INSERT INTO t1 VALUES('2001-01-01');
-UPDATE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
+UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (SELECT f1() FROM t1)) x, t1 SET f1 = 1;
Warnings:
Warning 1292 Incorrect datetime value: '1'
CREATE view v1 as SELECT f1() FROM t1;
-UPDATE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1;
+UPDATE IGNORE (SELECT 1 FROM t1 WHERE f1 = (select * from v1)) x, t1 SET f1 = 1;
Warnings:
Warning 1292 Incorrect datetime value: '1'
DROP VIEW v1;
@@ -919,6 +919,7 @@ Annftt','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2
00:00:00','Mi','Ag',1,2,NULL,2,1,2,1,24,NULL,NULL,NULL,NULL,NULL,0,0,'Kgggfrg
bzw. DigiCggg
Funktion','91.40.98.242','10002160','fg-gtgggggdgtfn','fg-gtgggggdgtfn','olgf.lifb@gggx.nft','18:18:25',NULL,1,1,0,1,1,1,1,0,0,0,0,0,0,0,NULL,NULL,0,0,'ffrtrgg',1,6,11,1.81111111111111,0,NULL,6,11,1.81111111111111,0,NULL,NULL,'out',NULL,NULL,'49','ggobilcogg','k.A.','gxtfrn','ggggil',NULL);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`ft1` datetime DEFAULT NULL,
`ft2` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
@@ -964,6 +965,7 @@ KEY `fe2` (`fe2`,`fe18`,`ft3`),
KEY `f33` (`f33`),
KEY `fe8` (`fe8`)
) DEFAULT CHARSET=latin1 COLLATE=latin1_general_ci ROW_FORMAT=COMPACT COMMENT='CustomerService und Outsourcer Userinformationen';
+SET sql_mode = DEFAULT;
INSERT INTO `t3` VALUES (1,'aabggn','gab, glgna',0,NULL,NULL,'gxtgrn D gnd g
gggsbgrg',0,NULL,'gxtgrn','dsa','dsa','gggsbgrg','0',91611,0,'0',0,'agsggschigdgn','2014-08-11','2014-09-05',0,'2011-01-01','2014-08-11'),(4,'aabigr','gab,
Iggr',0,NULL,NULL,'gxtgrn D gnd g
diff --git a/mysql-test/r/myisam-blob.result b/mysql-test/r/myisam-blob.result
index 6b41a244621..e60867fb5cf 100644
--- a/mysql-test/r/myisam-blob.result
+++ b/mysql-test/r/myisam-blob.result
@@ -28,16 +28,18 @@ INSERT INTO t1 set data=repeat('a',18*1024*1024);
select length(data) from t1;
length(data)
18874368
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify data blob;
Warnings:
Warning 1265 Data truncated for column 'data' at row 1
+set sql_mode = default;
select length(data) from t1;
length(data)
65535
drop table t1;
CREATE TABLE t1 (data BLOB) ENGINE=myisam;
INSERT INTO t1 (data) VALUES (NULL);
-UPDATE t1 set data=repeat('a',18*1024*1024);
+UPDATE IGNORE t1 set data=repeat('a',18*1024*1024);
Warnings:
Warning 1265 Data truncated for column 'data' at row 1
select length(data) from t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 54bb06b919a..cea256346dd 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -299,6 +299,7 @@ check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`post_id` mediumint(8) unsigned NOT NULL auto_increment,
`topic_id` mediumint(8) unsigned NOT NULL default '0',
@@ -316,7 +317,10 @@ KEY `poster_login` (`poster_login`),
KEY `topic_id` (`topic_id`),
FULLTEXT KEY `post_text` (`post_text`)
) ENGINE=MyISAM;
-INSERT INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t1 (post_text) VALUES ('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test'),('ceci est un test');
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'post_time'
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
@@ -1693,18 +1697,22 @@ create table t1 (v varchar(65530), key(v));
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
drop table if exists t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65536));
Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT
+set sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`v` mediumtext DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65530) character set utf8);
Warnings:
Note 1246 Converting column 'v' from VARCHAR to TEXT
+set sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/myisam_icp.result b/mysql-test/r/myisam_icp.result
index 374d4e45139..8581a2a51b2 100644
--- a/mysql-test/r/myisam_icp.result
+++ b/mysql-test/r/myisam_icp.result
@@ -63,7 +63,10 @@ PRIMARY KEY(c1),
UNIQUE(c2)
);
-INSERT INTO t1 VALUES('0000-00-00', '0000-00-00', '2008-01-04', '2008-01-05');
+INSERT IGNORE INTO t1 VALUES('0000-00-00', '0000-00-00', '2008-01-04', '2008-01-05');
+Warnings:
+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('2007-05-25', '2007-05-25', '2007-05-26', '2007-05-26');
INSERT INTO t1 VALUES('2008-01-01', NULL , '2008-01-02', '2008-01-03');
INSERT INTO t1 VALUES('2008-01-17', NULL , NULL , '2009-01-29');
@@ -93,7 +96,7 @@ c4 DATETIME,
PRIMARY KEY(c1),
UNIQUE INDEX(c2)
);
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
('0000-00-00 00:00:00','0000-00-00 00:00:00','2008-01-04','2008-01-05 00:00:00'),
('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02 00:00:00'),
('1999-01-01 00:00:00','1999-01-01 00:00:00', NULL, NULL),
@@ -102,6 +105,9 @@ INSERT INTO t1 VALUES
('2008-01-01 00:00:00', NULL, '2008-01-02','2008-01-03 00:00:00'),
('2009-01-29 11:11:27','2009-01-29 11:11:27','2009-01-29','2009-01-29 11:11:27'),
('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'c1' at row 1
+Warning 1265 Data truncated for column 'c2' at row 1
SELECT *
FROM t1
@@ -472,7 +478,7 @@ CREATE TABLE t2 (
t2_int int PRIMARY KEY,
t2_int2 INT
);
-INSERT INTO t2 VALUES ();
+INSERT IGNORE INTO t2 VALUES ();
INSERT INTO t1 VALUES ();
SELECT * FROM t1 AS t1a
WHERE NOT EXISTS (SELECT * FROM t1 AS t1b
@@ -566,7 +572,7 @@ COL1000 VARBINARY(179) NOT NULL,
col1003 DATE DEFAULT NULL,
KEY idx4267 (col1000, col1003)
);
-INSERT INTO t1 VALUES (),();
+INSERT IGNORE INTO t1 VALUES (),();
Warnings:
Warning 1364 Field 'col999' doesn't have a default value
Warning 1364 Field 'COL1000' doesn't have a default value
@@ -847,7 +853,7 @@ Handler_icp_attempts 2
Handler_icp_match 1
DROP TABLE t1;
create table t1 (a int,b char(5),primary key (a), key (b(1)));
-insert into t1 values ('a','b');
+insert ignore into t1 values ('a','b');
Warnings:
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
select 1 from t1 where a and b >= 'aa';
diff --git a/mysql-test/r/mysqlbinlog-innodb.result b/mysql-test/r/mysqlbinlog-innodb.result
index 9508f725ec4..9c5fcb62151 100644
--- a/mysql-test/r/mysqlbinlog-innodb.result
+++ b/mysql-test/r/mysqlbinlog-innodb.result
@@ -30,7 +30,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -61,7 +61,7 @@ use `foo`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/mysqlbinlog.result b/mysql-test/r/mysqlbinlog.result
index 108e03e5a47..2a23fafd3ef 100644
--- a/mysql-test/r/mysqlbinlog.result
+++ b/mysql-test/r/mysqlbinlog.result
@@ -23,7 +23,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -103,7 +103,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -139,7 +139,7 @@ BEGIN
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -190,7 +190,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -217,7 +217,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -297,7 +297,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -333,7 +333,7 @@ BEGIN
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -384,7 +384,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -493,7 +493,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
@@ -545,7 +545,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/mysqlbinlog_row_compressed.result b/mysql-test/r/mysqlbinlog_row_compressed.result
index e30557e08fa..0a8bd3a06d1 100644
--- a/mysql-test/r/mysqlbinlog_row_compressed.result
+++ b/mysql-test/r/mysqlbinlog_row_compressed.result
@@ -34,7 +34,7 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/mysqlbinlog_row_minimal.result b/mysql-test/r/mysqlbinlog_row_minimal.result
index bb23acc6484..d137155b520 100644
--- a/mysql-test/r/mysqlbinlog_row_minimal.result
+++ b/mysql-test/r/mysqlbinlog_row_minimal.result
@@ -32,7 +32,7 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/mysqlbinlog_stmt_compressed.result b/mysql-test/r/mysqlbinlog_stmt_compressed.result
index 99f9c7e9914..bb3b5feee3a 100644
--- a/mysql-test/r/mysqlbinlog_stmt_compressed.result
+++ b/mysql-test/r/mysqlbinlog_stmt_compressed.result
@@ -34,7 +34,7 @@ use `test`/*!*/;
SET TIMESTAMP=X/*!*/;
SET @@session.pseudo_thread_id=4/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result
index d272fd5cc15..7044b12727b 100644
--- a/mysql-test/r/mysqld--help.result
+++ b/mysql-test/r/mysqld--help.result
@@ -1463,7 +1463,7 @@ slave-type-conversions
slow-launch-time 2
slow-query-log FALSE
sort-buffer-size 2097152
-sql-mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+sql-mode STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
stack-trace TRUE
standard-compliant-cte TRUE
stored-program-cache 256
diff --git a/mysql-test/r/mysqldump-nl.result b/mysql-test/r/mysqldump-nl.result
index 829bf980103..683af0e168e 100644
--- a/mysql-test/r/mysqldump-nl.result
+++ b/mysql-test/r/mysqldump-nl.result
@@ -71,7 +71,7 @@ SET character_set_client = @saved_cs_client;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `sp`()
select * from `v1
diff --git a/mysql-test/r/mysqldump.result b/mysql-test/r/mysqldump.result
index dae6aaf776f..a03475efa61 100644
--- a/mysql-test/r/mysqldump.result
+++ b/mysql-test/r/mysqldump.result
@@ -47,7 +47,7 @@ DROP TABLE t1;
# Bug#2055 mysqldump should replace "-inf" numeric field values with "NULL"
#
CREATE TABLE t1 (a double);
-INSERT INTO t1 VALUES ('-9e999999');
+INSERT IGNORE INTO t1 VALUES ('-9e999999');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
/*!40101 SET @saved_cs_client = @@character_set_client */;
@@ -2468,10 +2468,10 @@ if new.a > 10 then
set new.a := 10;
set new.a := 11;
end if;
-end BEFORE 0000-00-00 00:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+end BEFORE 0000-00-00 00:00:00 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg2 UPDATE t1 begin
if old.a % 2 = 0 then set new.b := 12; end if;
-end BEFORE 0000-00-00 00:00:00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+end BEFORE 0000-00-00 00:00:00 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg3 UPDATE t1 begin
if new.a = -1 then
set @fired:= "Yes";
@@ -2515,7 +2515,7 @@ UNLOCK TABLES;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger trg1 before insert on t1 for each row
begin
@@ -2536,7 +2536,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger trg2 before update on t1 for each row begin
if old.a % 2 = 0 then set new.b := 12; end if;
@@ -2671,10 +2671,10 @@ if new.a > 10 then
set new.a := 10;
set new.a := 11;
end if;
-end BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+end BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg2 UPDATE t1 begin
if old.a % 2 = 0 then set new.b := 12; end if;
-end BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+end BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
trg3 UPDATE t1 begin
if new.a = -1 then
set @fired:= "Yes";
@@ -2717,7 +2717,7 @@ a2
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
testref INSERT test1 BEGIN
-INSERT INTO test2 SET a2 = NEW.a1; END BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+INSERT INTO test2 SET a2 = NEW.a1; END BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SELECT * FROM `test1`;
a1
1
@@ -2789,7 +2789,7 @@ UNLOCK TABLES;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func1`(a INT, b INT) RETURNS int(11)
RETURN a+b ;;
@@ -2806,7 +2806,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` FUNCTION `bug9056_func2`(f1 char binary) RETURNS char(1) CHARSET latin1
begin
@@ -2843,7 +2843,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc1`(IN a INT, IN b INT, OUT c INT)
BEGIN SELECT a+b INTO c; end ;;
@@ -2860,7 +2860,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `bug9056_proc2`(OUT a INT)
BEGIN
@@ -3861,7 +3861,7 @@ create procedure mysqldump_test_db.sp1() select 'hello';
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`user1`@`%` PROCEDURE `sp1`()
select 'hello' ;;
diff --git a/mysql-test/r/mysqlhotcopy_myisam.result b/mysql-test/r/mysqlhotcopy_myisam.result
index 52aeffce5cf..6080697a7a1 100644
--- a/mysql-test/r/mysqlhotcopy_myisam.result
+++ b/mysql-test/r/mysqlhotcopy_myisam.result
@@ -6,13 +6,13 @@ CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=MyISAM;
INSERT INTO t1 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
-Warning 1265 Data truncated for column 'c2' at row 2
+Warning 1406 Data too long for column 'c2' at row 2
INSERT INTO t2 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
-Warning 1265 Data truncated for column 'c2' at row 2
+Warning 1406 Data too long for column 'c2' at row 2
INSERT INTO t3 VALUES (1,'aaaaaaaaaaaaaaaaaaaa'),(2, 'bbbbbbbbbbbbbbbbbbbbbbb');
Warnings:
-Warning 1265 Data truncated for column 'c2' at row 2
+Warning 1406 Data too long for column 'c2' at row 2
db.opt
t1.MYD
t1.MYI
diff --git a/mysql-test/r/null.result b/mysql-test/r/null.result
index 1c88a607541..72b3b7c143c 100644
--- a/mysql-test/r/null.result
+++ b/mysql-test/r/null.result
@@ -2,6 +2,10 @@ drop table if exists t1, t2;
select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
NULL NULL isnull(null) isnull(1/0) isnull(1/0 = null) ifnull(null,1) ifnull(null,"TRUE") ifnull("TRUE","ERROR") 1/0 is null 1 is not null
NULL NULL 1 1 1 1 TRUE TRUE 1 1
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
explain extended select null,\N,isnull(null),isnull(1/0),isnull(1/0 = null),ifnull(null,1),ifnull(null,"TRUE"),ifnull("TRUE","ERROR"),1/0 is null,1 is not null;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
@@ -91,6 +95,7 @@ b ifnull(t2.b,"this is null")
NULL this is null
NULL this is null
drop table t1;
+set sql_mode='NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(16) NOT NULL default '', b smallint(6) NOT NULL default 0, c datetime NOT NULL default '0000-00-00 00:00:00', d smallint(6) NOT NULL default 0);
INSERT INTO t1 SET a = "", d= "2003-01-14 03:54:55";
Warnings:
@@ -145,6 +150,7 @@ a b c d
0 0000-00-00 00:00:00 0
0 0000-00-00 00:00:00 0
drop table t1;
+set sql_mode=default;
create table t1 (a int not null, b int not null, index idx(a));
insert into t1 values
(1,1), (2,2), (3,3), (4,4), (5,5), (6,6),
@@ -177,9 +183,11 @@ id select_type table type possible_keys key key_len ref rows Extra
select count(*) from t1 where i=2 or i is null;
count(*)
10
+set sql_mode='NO_ENGINE_SUBSTITUTION';
alter table t1 change i i int not null;
Warnings:
Warning 1265 Data truncated for column 'i' at row 513
+set sql_mode=default;
explain select * from t1 where i=2 or i is null;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref i i 4 const 7 Using index
@@ -354,7 +362,7 @@ INSERT INTO t1 VALUES (NOW()),(NOW());
EXPLAIN
SELECT * FROM t1 WHERE concat( dt, '2012-12-21 12:12:12' ) IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE concat( dt, '2012-12-21 12:12:12' ) IS NULL;
dt
DROP TABLE t1;
@@ -363,7 +371,7 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN
SELECT * FROM t1 WHERE concat( dt, '1' ) IS NULL;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE concat( dt, '1' ) IS NULL;
dt
DROP TABLE t1;
@@ -372,7 +380,7 @@ INSERT INTO t1 VALUES (1),(2);
EXPLAIN
SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
+1 SIMPLE t1 ALL NULL NULL NULL NULL 2 Using where
SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
dt
DROP TABLE t1;
@@ -429,6 +437,7 @@ t2 CREATE TABLE `t2` (
DROP TABLE t1,t2;
SELECT NULLIF(_latin1'a' COLLATE latin1_general_ci, _latin1'a' COLLATE latin1_bin);
ERROR HY000: Illegal mix of collations (latin1_general_ci,EXPLICIT) and (latin1_bin,EXPLICIT) for operation 'nullif'
+set sql_mode='NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT
NULLIF(1,1),
NULLIF(1,1.0),
@@ -555,6 +564,7 @@ t1 CREATE TABLE `t1` (
`NULLIF(TIME'00:00:01',DATE'2001-01-01')` time DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+set sql_mode=default;
CREATE TABLE t1
(
c_tinyint TINYINT,
@@ -1383,6 +1393,7 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = 2010
DROP TABLE t1;
# Two warnings expected
+set sql_mode='NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT
NULLIF(TIMESTAMP'2001-01-01 00:00:00',1) AS a,
CASE WHEN TIMESTAMP'2001-01-01 00:00:00'=1 THEN NULL
@@ -1392,6 +1403,7 @@ Warnings:
Warning 1292 Incorrect datetime value: '1'
Warning 1292 Incorrect datetime value: '1'
DROP TABLE t1;
+set sql_mode=default;
#
# MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL
#
diff --git a/mysql-test/r/null_key.result b/mysql-test/r/null_key.result
index 81bfa1ac994..4b4a4b80dee 100644
--- a/mysql-test/r/null_key.result
+++ b/mysql-test/r/null_key.result
@@ -342,7 +342,7 @@ id2 integer not null,
index (id),
index (id2)
);
-insert into t1 values(null,null),(1,1);
+insert ignore into t1 values(null,null),(1,1);
Warnings:
Warning 1048 Column 'id2' cannot be null
select * from t1;
diff --git a/mysql-test/r/old-mode.result b/mysql-test/r/old-mode.result
index c2ee3324ede..d4844ec640c 100644
--- a/mysql-test/r/old-mode.result
+++ b/mysql-test/r/old-mode.result
@@ -30,30 +30,34 @@ Warnings:
Warning 1292 Truncated incorrect datetime value: '-10:30:30'
SELECT CAST(TIME'10:20:30' AS DATETIME);
CAST(TIME'10:20:30' AS DATETIME)
-0000-00-00 10:20:30
+NULL
+Warnings:
+Warning 1292 Truncated incorrect datetime value: '10:20:30'
SELECT CAST(TIME'830:20:30' AS DATETIME);
CAST(TIME'830:20:30' AS DATETIME)
0000-01-03 14:20:30
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (TIME'-10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+INSERT IGNORE INTO t1 VALUES (TIME'10:20:30');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-INSERT INTO t1 VALUES (TIME'10:20:30');
INSERT INTO t1 VALUES (TIME'830:20:30');
SELECT * FROM t1;
a
0000-00-00 00:00:00
-0000-00-00 10:20:30
+0000-00-00 00:00:00
0000-01-03 14:20:30
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP);
-INSERT INTO t1 VALUES (TIME'-10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-INSERT INTO t1 VALUES (TIME'10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'10:20:30');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-INSERT INTO t1 VALUES (TIME'830:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'830:20:30');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT * FROM t1;
@@ -69,13 +73,15 @@ INSERT INTO t1 VALUES (TIME'830:20:30');
SELECT a, CAST(a AS DATETIME), TO_DAYS(a) FROM t1;
a CAST(a AS DATETIME) TO_DAYS(a)
-10:20:30 NULL NULL
-10:20:30 0000-00-00 10:20:30 NULL
-830:20:30 0000-01-03 14:20:30 NULL
+10:20:30 NULL NULL
+830:20:30 NULL NULL
Warnings:
-Warning 1292 Truncated incorrect datetime value: '-10:20:30'
Warning 1264 Out of range value 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 2
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 3
DROP TABLE t1;
SELECT TO_DAYS(TIME'-10:20:30');
TO_DAYS(TIME'-10:20:30')
diff --git a/mysql-test/r/order_by.result b/mysql-test/r/order_by.result
index fd5c9596b6c..16da3fc4b95 100644
--- a/mysql-test/r/order_by.result
+++ b/mysql-test/r/order_by.result
@@ -1,6 +1,7 @@
call mtr.add_suppression("Sort aborted.*");
drop table if exists t1,t2,t3;
call mtr.add_suppression("Out of sort memory; increase server sort buffer size");
+set sql_mode='NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(6) DEFAULT '0' NOT NULL,
idservice int(5),
diff --git a/mysql-test/r/order_by_zerolength-4285.result b/mysql-test/r/order_by_zerolength-4285.result
index f60ce7d90c7..52204d14191 100644
--- a/mysql-test/r/order_by_zerolength-4285.result
+++ b/mysql-test/r/order_by_zerolength-4285.result
@@ -3,14 +3,14 @@ insert into t1 values (1),(2),(3),(4),(5),(6),(7),(8),(9),(10);
select * from t1 order by now(), cast(pk as char(0));
pk
1
-2
-3
-4
-5
-6
-7
-8
9
+8
+7
+6
+5
+4
+3
+2
10
Warnings:
Warning 1292 Truncated incorrect CHAR(0) value: '1'
diff --git a/mysql-test/r/packet.result b/mysql-test/r/packet.result
index 254ad93d78e..726c3364350 100644
--- a/mysql-test/r/packet.result
+++ b/mysql-test/r/packet.result
@@ -1,5 +1,6 @@
set @max_allowed_packet=@@global.max_allowed_packet;
set @net_buffer_length=@@global.net_buffer_length;
+set sql_mode='NO_ENGINE_SUBSTITUTION';
set global max_allowed_packet=100;
Warnings:
Warning 1292 Truncated incorrect max_allowed_packet value: '100'
@@ -7,6 +8,7 @@ Warning 1708 The value of 'max_allowed_packet' should be no less than the value
set global net_buffer_length=100;
Warnings:
Warning 1292 Truncated incorrect net_buffer_length value: '100'
+set sql_mode=default;
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
len
1024
diff --git a/mysql-test/r/partition_binlog_stmt.result b/mysql-test/r/partition_binlog_stmt.result
index 5b9df742f70..b5bf9e85204 100644
--- a/mysql-test/r/partition_binlog_stmt.result
+++ b/mysql-test/r/partition_binlog_stmt.result
@@ -2,12 +2,16 @@ DROP TABLE IF EXISTS t1;
#
# Bug#51851: Server with SBR locks mutex twice on LOAD DATA into
# partitioned MyISAM table
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
name TINYBLOB NOT NULL,
modified TIMESTAMP DEFAULT '0000-00-00 00:00:00',
INDEX namelocs (name(255))) ENGINE = MyISAM
PARTITION BY HASH(id) PARTITIONS 2;
+SET sql_mode = DEFAULT;
LOAD DATA LOCAL INFILE 'MYSQLTEST_VARDIR/tmp/init_file.txt'
INTO TABLE t1 (name);
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'modified'
DROP TABLE t1;
diff --git a/mysql-test/r/partition_datatype.result b/mysql-test/r/partition_datatype.result
index 31d265d95ee..1244748bf1f 100644
--- a/mysql-test/r/partition_datatype.result
+++ b/mysql-test/r/partition_datatype.result
@@ -361,18 +361,20 @@ PARTITION `pEnd` VALUES LESS THAN (UNIX_TIMESTAMP(20380119031407)),
PARTITION `pMax` VALUES LESS THAN MAXVALUE);
# Test 'odd' values
INSERT INTO t1 VALUES (NULL, 'UTC');
-INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'UTC');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 00:00:00', 'UTC');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
# Test invalid values
-INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
# Test start range
@@ -397,34 +399,36 @@ INSERT INTO t1 VALUES ('2011-10-30 00:00:01', 'UTC');
SET @@session.time_zone = 'Europe/Moscow';
# Test 'odd' values
INSERT INTO t1 VALUES (NULL, 'Moscow');
-INSERT INTO t1 VALUES ('0000-00-00 00:00:00', 'Moscow');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 00:00:00', 'Moscow');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
# Test invalid values
-INSERT INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
-INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-INSERT INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
# values truncated to 03:00:00 due to daylight saving shift
-INSERT INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI');
Warnings:
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1
-INSERT INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI');
Warnings:
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1
-INSERT INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI');
Warnings:
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 1
# Test start range
@@ -446,6 +450,19 @@ INSERT INTO t1 VALUES ('2011-10-30 03:00:00', 'Moscow');
INSERT INTO t1 VALUES ('2011-10-30 03:00:01', 'Moscow');
SET @@session.time_zone = 'UTC';
INSERT INTO t2 SELECT * FROM t1;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 2
+Warning 1265 Data truncated for column 'a' at row 3
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 5
+Warning 1265 Data truncated for column 'a' at row 6
+Warning 1265 Data truncated for column 'a' at row 24
+Warning 1265 Data truncated for column 'a' at row 25
+Warning 1265 Data truncated for column 'a' at row 26
+Warning 1265 Data truncated for column 'a' at row 27
+Warning 1265 Data truncated for column 'a' at row 28
+Warning 1265 Data truncated for column 'a' at row 29
+Warning 1265 Data truncated for column 'a' at row 30
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME = 't2';
PARTITION_NAME TABLE_ROWS
@@ -678,7 +695,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p-2012-MSK-1,p-2012-MSK-2 ALL NULL NULL NULL NULL 7 Using where; Using filesort
# Test end range changes
DELETE FROM t2 WHERE a = 0;
-INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC');
+INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT COUNT(*) FROM t2;
@@ -697,14 +714,16 @@ a tz
2038-01-19 03:14:07 Moscow
2038-01-19 03:14:07 UTC
2038-01-19 03:14:06 Moscow
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1264 Out of range value for column 'a' at row 34
Warning 1264 Out of range value for column 'a' at row 35
SELECT MIN(a), MAX(a) FROM t2;
MIN(a) MAX(a)
-0000-00-00 00:00:00 2038-01-19 03:14:07
+NULL 2038-01-19 03:14:07
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
SELECT COUNT(*) FROM t2;
COUNT(*)
35
@@ -761,7 +780,7 @@ NULL UTC
2038-01-19 03:14:07 Moscow
2038-01-19 03:14:07 UTC
# Test start range changes
-INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC');
+INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'UTC');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT COUNT(*) FROM t2;
@@ -780,7 +799,7 @@ a tz
2038-01-19 03:14:07 Moscow
2038-01-19 03:14:07 UTC
2011-10-30 00:00:02 Moscow
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
@@ -863,6 +882,19 @@ t2 CREATE TABLE `t2` (
TRUNCATE TABLE t2;
SET @@session.time_zone = 'Europe/Moscow';
INSERT INTO t2 SELECT * FROM t1;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 2
+Warning 1265 Data truncated for column 'a' at row 3
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 5
+Warning 1265 Data truncated for column 'a' at row 6
+Warning 1265 Data truncated for column 'a' at row 24
+Warning 1265 Data truncated for column 'a' at row 25
+Warning 1265 Data truncated for column 'a' at row 26
+Warning 1265 Data truncated for column 'a' at row 27
+Warning 1265 Data truncated for column 'a' at row 28
+Warning 1265 Data truncated for column 'a' at row 29
+Warning 1265 Data truncated for column 'a' at row 30
SELECT PARTITION_NAME, TABLE_ROWS FROM INFORMATION_SCHEMA.PARTITIONS
WHERE TABLE_NAME = 't2';
PARTITION_NAME TABLE_ROWS
@@ -870,8 +902,8 @@ p0 2
p-2000 16
p-2011-MSK 2
p-2011-MSD-1 9
-p-2011-MSD-2 6
-p-2012-MSK-1 3
+p-2011-MSD-2 9
+p-2012-MSK-1 0
p-2012-MSK-2 4
pEnd 2
pMax 2
@@ -956,12 +988,12 @@ NULL UTC
2011-10-30 01:59:59 UTC
2011-10-30 02:00:00 MoscowD
2011-10-30 02:00:00 UTC
+2011-10-30 02:00:00 UTC
2011-10-30 02:00:01 MoscowD
2011-10-30 02:00:01 UTC
+2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 MoscowD
2011-10-30 02:59:59 UTC
-2011-10-30 02:00:00 UTC
-2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 UTC
2011-10-30 03:00:00 Moscow
2011-10-30 03:00:00 UTC
@@ -1071,12 +1103,12 @@ a tz
2011-10-30 01:59:59 UTC
2011-10-30 02:00:00 MoscowD
2011-10-30 02:00:00 UTC
+2011-10-30 02:00:00 UTC
2011-10-30 02:00:01 MoscowD
2011-10-30 02:00:01 UTC
+2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 MoscowD
2011-10-30 02:59:59 UTC
-2011-10-30 02:00:00 UTC
-2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 UTC
2011-10-30 03:00:00 Moscow
2011-10-30 03:00:00 UTC
@@ -1094,12 +1126,12 @@ a tz
2011-10-30 01:59:59 UTC
2011-10-30 02:00:00 MoscowD
2011-10-30 02:00:00 UTC
+2011-10-30 02:00:00 UTC
2011-10-30 02:00:01 MoscowD
2011-10-30 02:00:01 UTC
+2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 MoscowD
2011-10-30 02:59:59 UTC
-2011-10-30 02:00:00 UTC
-2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 UTC
2011-10-30 03:00:00 Moscow
2011-10-30 03:00:00 UTC
@@ -1117,12 +1149,12 @@ a tz
2011-10-30 01:59:59 UTC
2011-10-30 02:00:00 MoscowD
2011-10-30 02:00:00 UTC
+2011-10-30 02:00:00 UTC
2011-10-30 02:00:01 MoscowD
2011-10-30 02:00:01 UTC
+2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 MoscowD
2011-10-30 02:59:59 UTC
-2011-10-30 02:00:00 UTC
-2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 UTC
2011-10-30 03:00:00 Moscow
2011-10-30 03:00:00 UTC
@@ -1140,12 +1172,12 @@ a tz
2011-10-30 01:59:59 UTC
2011-10-30 02:00:00 MoscowD
2011-10-30 02:00:00 UTC
+2011-10-30 02:00:00 UTC
2011-10-30 02:00:01 MoscowD
2011-10-30 02:00:01 UTC
+2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 MoscowD
2011-10-30 02:59:59 UTC
-2011-10-30 02:00:00 UTC
-2011-10-30 02:00:01 UTC
2011-10-30 02:59:59 UTC
2011-10-30 03:00:00 Moscow
2011-10-30 03:00:00 UTC
@@ -1158,7 +1190,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t2 p-2011-MSD-1,p-2011-MSD-2,p-2012-MSK-1,p-2012-MSK-2 ALL NULL NULL NULL NULL 22 Using where; Using filesort
# Test end range changes
DELETE FROM t2 WHERE a = 0;
-INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow');
+INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT COUNT(*) FROM t2;
@@ -1177,7 +1209,7 @@ a tz
2038-01-19 06:14:07 Moscow
2038-01-19 06:14:07 UTC
2038-01-19 06:14:06 Moscow
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1299 Invalid TIMESTAMP value in column 'a' at row 8
@@ -1186,7 +1218,9 @@ Warning 1264 Out of range value for column 'a' at row 34
Warning 1264 Out of range value for column 'a' at row 35
SELECT MIN(a), MAX(a) FROM t2;
MIN(a) MAX(a)
-0000-00-00 00:00:00 2038-01-19 06:14:07
+NULL 2038-01-19 06:14:07
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
SELECT COUNT(*) FROM t2;
COUNT(*)
35
@@ -1243,7 +1277,7 @@ NULL UTC
2038-01-19 06:14:07 Moscow
2038-01-19 06:14:07 UTC
# Test start range changes
-INSERT INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow');
+INSERT IGNORE INTO t2 VALUES ('1970-01-01 00:00:00', 'Moscow');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
SELECT COUNT(*) FROM t2;
@@ -1262,7 +1296,7 @@ a tz
2038-01-19 06:14:07 Moscow
2038-01-19 06:14:07 UTC
2011-10-30 03:00:02 Moscow
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
Warnings:
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
diff --git a/mysql-test/r/partition_default.result b/mysql-test/r/partition_default.result
index 2833d92de32..dad12157503 100644
--- a/mysql-test/r/partition_default.result
+++ b/mysql-test/r/partition_default.result
@@ -393,29 +393,33 @@ PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
PARTITION `pNULL` VALUES IN (NULL),
PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
-INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 6
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -423,45 +427,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -473,51 +476,51 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
# test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -525,45 +528,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -575,27 +577,25 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
DROP TABLE t1;
# TO_SECONDS, test of LIST and index
@@ -606,29 +606,33 @@ PARTITION `p2001-01-01` VALUES IN (TO_SECONDS('2001-01-01')),
PARTITION `pNULL` VALUES IN (NULL),
PARTITION `p0000-01-02` VALUES IN (TO_SECONDS('0000-01-02')),
PARTITION `p1001-01-01` VALUES IN (TO_SECONDS('1001-01-01')));
-INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 6
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -636,45 +640,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -686,51 +689,51 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
# test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -738,45 +741,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -788,27 +790,25 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
DROP TABLE t1;
create table t1 (a int, b int);
diff --git a/mysql-test/r/partition_error.result b/mysql-test/r/partition_error.result
index eeea5215218..3c34e4da834 100644
--- a/mysql-test/r/partition_error.result
+++ b/mysql-test/r/partition_error.result
@@ -71,7 +71,7 @@ ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitio
CREATE TABLE t1 (a DATE)
PARTITION BY RANGE (DAYOFWEEK(a))
(PARTITION a1 VALUES LESS THAN (60));
-INSERT INTO t1 VALUES ('test'),('a'),('5');
+INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
@@ -85,7 +85,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a DATETIME)
PARTITION BY RANGE (DAYOFWEEK(a))
(PARTITION a1 VALUES LESS THAN (60));
-INSERT INTO t1 VALUES ('test'),('a'),('5');
+INSERT IGNORE INTO t1 VALUES ('test'),('a'),('5');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
@@ -1670,11 +1670,13 @@ PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
PARTITION p VALUES LESS THAN (18),
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE new (a TIMESTAMP NOT NULL, b TIMESTAMP NOT NULL, PRIMARY KEY(a,b))
PARTITION BY RANGE (DATEDIFF(a, a)) (
PARTITION p VALUES LESS THAN (18),
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
+SET sql_mode = DEFAULT;
ALTER TABLE old
PARTITION BY RANGE (DATEDIFF(a, a)) (
PARTITION p VALUES LESS THAN (18),
@@ -1741,6 +1743,7 @@ PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
PARTITION p VALUES LESS THAN (1219089600),
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE new (a TIMESTAMP, b TIMESTAMP)
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
PARTITION p VALUES LESS THAN (1219089600),
@@ -1753,6 +1756,7 @@ PARTITION p VALUES LESS THAN (1219089600),
PARTITION pmax VALUES LESS THAN MAXVALUE);
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
DROP TABLE old;
+SET sql_mode = DEFAULT;
#
# Bug #56709: Memory leaks at running the 5.1 test suite
#
@@ -1829,6 +1833,7 @@ p1 p1spSecond
p2 p2spFirst Comment in p2
p2 p2spSecond SubPartition comment in p2spSecond
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(a INT ,
KEY inx_a (a) )
@@ -1843,6 +1848,7 @@ PARTITION pMax VALUES LESS THAN MAXVALUE COMMENT
Warnings:
Warning 1793 Comment for table partition 'pUpTo10' is too long (max = 1024)
Warning 1793 Comment for table partition 'pMax' is too long (max = 1024)
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/partition_exchange.result b/mysql-test/r/partition_exchange.result
index f7b2d7647ff..f7dcb0a5e0a 100644
--- a/mysql-test/r/partition_exchange.result
+++ b/mysql-test/r/partition_exchange.result
@@ -4,6 +4,7 @@ DROP TABLE IF EXISTS t1, t2, t3, t, tp, tsp, tmp;
# ROW_FORMAT WAS SET EXPLICITLY
#
# Same definition (both have ROW_FORMAT set)
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(11) NOT NULL AUTO_INCREMENT,
year year(2) DEFAULT NULL,
@@ -20,6 +21,7 @@ Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Pleas
ALTER TABLE t2 REMOVE PARTITIONING;
Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table t1
Create Table CREATE TABLE `t1` (
@@ -89,6 +91,7 @@ ROW_FORMAT Compact
CREATE_OPTIONS row_format=COMPACT
DROP TABLE t2;
# Only the partitioned table have ROW_FORMAT set.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
id int(11) NOT NULL AUTO_INCREMENT,
year year(2) DEFAULT NULL,
@@ -104,6 +107,7 @@ Warnings:
Level Note
Code 1287
Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table t1
Create Table CREATE TABLE `t1` (
@@ -137,6 +141,7 @@ ROW_FORMAT Compact
CREATE_OPTIONS
# Only the non partitioned table have ROW_FORMAT set.
DROP TABLE t1, t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(11) NOT NULL AUTO_INCREMENT,
year year(2) DEFAULT NULL,
@@ -164,6 +169,7 @@ Warnings:
Level Note
Code 1287
Message 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table t1
Create Table CREATE TABLE `t1` (
@@ -197,6 +203,7 @@ ROW_FORMAT Compact
CREATE_OPTIONS row_format=COMPACT
# No table have ROW_FORMAT set.
DROP TABLE t1, t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(11) NOT NULL AUTO_INCREMENT,
year year(2) DEFAULT NULL,
@@ -430,10 +437,12 @@ ENGINE InnoDB
ROW_FORMAT Redundant
CREATE_OPTIONS row_format=REDUNDANT
DROP TABLE t1, t2;
+SET sql_mode = DEFAULT;
#
# Bug#56484: !table || (!table->read_set ||
# bitmap_is_set(table->read_set, field_index))
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a INT NOT NULL,b TIME NOT NULL DEFAULT '00:00:00')
ENGINE=MyISAM
PARTITION BY HASH (a) PARTITIONS 2;
@@ -441,6 +450,7 @@ CREATE TABLE t2 (a INT) ENGINE=MYISAM;
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2;
ERROR HY000: Tables have different definitions
DROP TABLE t1, t2;
+SET sql_mode = DEFAULT;
#
# Bug#55784: Foreign key integrity broken by alter table
#
@@ -1105,7 +1115,11 @@ CREATE TABLE t LIKE tp;
ALTER TABLE t REMOVE PARTITIONING;
CREATE TABLE t2 LIKE t;
INSERT INTO tp VALUES ("First in tp", '2000-01-02 03:04:25'), ("Zebra in tp", '0000-00-00 00:00:00'), ("Second in tp", '2010-01-01 05:12:24');
+Warnings:
+Warning 1264 Out of range value for column 'b' at row 2
INSERT INTO t VALUES ("First in t", '2000-01-02 03:04:25'), ("a test in t", '0000-00-00 00:00:00'), ("Echo in t", '2010-01-01 05:12:24');
+Warnings:
+Warning 1264 Out of range value for column 'b' at row 2
# tp_lock '0' t_lock 'READ' t2_lock 'READ' count '17'
LOCK TABLE t READ, t2 READ;
ALTER TABLE tp EXCHANGE PARTITION p0 WITH TABLE t;
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index c1eff91de53..5e4fa77f9c8 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -553,8 +553,10 @@ DROP TABLE t1;
# Bug#54783: optimize table crashes with invalid timestamp default value and NO_ZERO_DATE
#
DROP TABLE IF EXISTS t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a INT, b TIMESTAMP DEFAULT '0000-00-00 00:00:00')
ENGINE=INNODB PARTITION BY LINEAR HASH (a) PARTITIONS 1;
+SET sql_mode = DEFAULT;
SET @old_mode = @@sql_mode;
SET SESSION sql_mode = 'NO_ZERO_DATE';
OPTIMIZE TABLE t1;
diff --git a/mysql-test/r/partition_pruning.result b/mysql-test/r/partition_pruning.result
index 0fb24b74218..69a43ae7238 100644
--- a/mysql-test/r/partition_pruning.result
+++ b/mysql-test/r/partition_pruning.result
@@ -640,29 +640,33 @@ PARTITION BY RANGE (TO_DAYS(a))
PARTITION `p0001-01-01` VALUES LESS THAN (366 + 1),
PARTITION `p1001-01-01` VALUES LESS THAN (TO_DAYS('1001-01-01') + 1),
PARTITION `p2001-01-01` VALUES LESS THAN (TO_DAYS('2001-01-01') + 1));
-INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 6
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -670,45 +674,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -720,55 +723,53 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p2001-01-01 index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
@@ -793,7 +794,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01,p2001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
+1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p1001-01-01,p2001-01-01 index a a 4 NULL 5 Using where; Using index
@@ -801,28 +802,30 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p0001-01-01,p1001-01-01 index a a 4 NULL 6 Using where; Using index
# test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -830,45 +833,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -880,27 +882,25 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
@@ -969,29 +969,33 @@ PARTITION `p2001-01-01` VALUES IN (TO_DAYS('2001-01-01')),
PARTITION `pNULL` VALUES IN (NULL),
PARTITION `p0000-01-02` VALUES IN (TO_DAYS('0000-01-02')),
PARTITION `p1001-01-01` VALUES IN (TO_DAYS('1001-01-01')));
-INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 6
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -999,45 +1003,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -1049,55 +1052,53 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
@@ -1122,7 +1123,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
@@ -1130,28 +1131,30 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
# test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -1159,45 +1162,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -1209,27 +1211,25 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
@@ -1298,29 +1298,33 @@ PARTITION `p2001-01-01` VALUES IN (TO_SECONDS('2001-01-01')),
PARTITION `pNULL` VALUES IN (NULL),
PARTITION `p0000-01-02` VALUES IN (TO_SECONDS('0000-01-02')),
PARTITION `p1001-01-01` VALUES IN (TO_SECONDS('1001-01-01')));
-INSERT INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'), ('0000-01-02'), ('0001-01-01'),
('1001-00-00'), ('1001-01-01'), ('1002-00-00'), ('2001-01-01');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 4
+Warning 1265 Data truncated for column 'a' at row 6
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -1328,45 +1332,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -1378,55 +1381,53 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL index a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p1001-01-01 system a NULL NULL NULL 1
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a <= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a >= '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a > '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 4 Using where; Using index
+1 SIMPLE t1 p2001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a = '1001-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL ref a a 4 const 1 Using index
@@ -1451,7 +1452,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 3 Using where; Using index
+1 SIMPLE t1 p0001-01-01,pNULL,p0000-01-02,p1001-01-01 range a a 4 NULL 4 Using where; Using index
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 pNULL,p1001-01-01 index a a 4 NULL 4 Using where; Using index
@@ -1459,28 +1460,30 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01
id select_type table partitions type possible_keys key key_len ref rows Extra
1 SIMPLE t1 p0001-01-01,pNULL,p1001-01-01 range a a 4 NULL 3 Using where; Using index
# test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE a < '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a <= '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a >= '1001-01-01';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-01-01';
a
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-01-01';
a
@@ -1488,45 +1491,44 @@ a
SELECT * FROM t1 WHERE a < '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
SELECT * FROM t1 WHERE a <= '1001-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
SELECT * FROM t1 WHERE a >= '1001-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a > '1001-00-00';
a
1001-01-01
-1002-00-00
2001-01-01
SELECT * FROM t1 WHERE a = '1001-00-00';
a
-1001-00-00
# Disabling warnings for the invalid date
SELECT * FROM t1 WHERE a < '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a <= '1999-02-31';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a >= '1999-02-31';
a
2001-01-01
@@ -1538,27 +1540,25 @@ a
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1002-00-00';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0000-00-00' AND '1001-01-01';
a
0000-00-00
+0000-00-00
+0000-00-00
0000-01-02
0001-01-01
-1001-00-00
1001-01-01
SELECT * FROM t1 WHERE a BETWEEN '0001-01-02' AND '1002-00-00';
a
-1001-00-00
1001-01-01
-1002-00-00
SELECT * FROM t1 WHERE a BETWEEN '0001-01-01' AND '1001-01-01';
a
0001-01-01
-1001-00-00
1001-01-01
EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a < '1001-01-01';
id select_type table partitions type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/r/plugin_auth.result b/mysql-test/r/plugin_auth.result
index 8bb360e96ae..e470cc010c0 100644
--- a/mysql-test/r/plugin_auth.result
+++ b/mysql-test/r/plugin_auth.result
@@ -365,7 +365,7 @@ DROP USER uplain@localhost;
#
# Bug #59038 : mysql.user.authentication_string column
# causes configuration wizard to fail
-INSERT INTO mysql.user(
+INSERT IGNORE INTO mysql.user(
Host,
User,
Password,
diff --git a/mysql-test/r/pool_of_threads.result b/mysql-test/r/pool_of_threads.result
index b25d8d1e50e..45ef2287c3b 100644
--- a/mysql-test/r/pool_of_threads.result
+++ b/mysql-test/r/pool_of_threads.result
@@ -2094,6 +2094,7 @@ t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
ver_nr int(11) NOT NULL default '0',
@@ -2143,6 +2144,7 @@ KEY mcbs_aufnr(mcbs_aufnr),
KEY kundentyp(kundentyp),
KEY p_nr(p_nr,suffix)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
diff --git a/mysql-test/r/ps.result b/mysql-test/r/ps.result
index 5b7d4b6fa7f..638341772e8 100644
--- a/mysql-test/r/ps.result
+++ b/mysql-test/r/ps.result
@@ -768,13 +768,13 @@ deallocate prepare stmt;
drop table t1;
prepare stmt from 'create table t1 (a varchar(10) character set utf8)';
execute stmt;
-insert into t1 (a) values (repeat('a', 20));
+insert ignore into t1 (a) values (repeat('a', 20));
select length(a) from t1;
length(a)
10
drop table t1;
execute stmt;
-insert into t1 (a) values (repeat('a', 20));
+insert ignore into t1 (a) values (repeat('a', 20));
select length(a) from t1;
length(a)
10
@@ -2395,15 +2395,15 @@ create procedure a() select 42;
create procedure proc_1(a char(2)) show create procedure a;
call proc_1("bb");
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
call proc_1("bb");
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
call proc_1("bb");
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
drop procedure proc_1;
create function func_1() returns int begin show create procedure a; return 1; end|
@@ -2415,15 +2415,15 @@ ERROR 42000: FUNCTION test.func_1 does not exist
prepare abc from "show create procedure a";
execute abc;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
execute abc;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
execute abc;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `a`()
select 42 latin1 latin1_swedish_ci latin1_swedish_ci
deallocate prepare abc;
drop procedure a;
@@ -2432,15 +2432,15 @@ create function a() returns int return 42+13;
create procedure proc_1(a char(2)) show create function a;
call proc_1("bb");
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
call proc_1("bb");
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
call proc_1("bb");
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
drop procedure proc_1;
create function func_1() returns int begin show create function a; return 1; end|
@@ -2452,15 +2452,15 @@ ERROR 42000: FUNCTION test.func_1 does not exist
prepare abc from "show create function a";
execute abc;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
execute abc;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
execute abc;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-a NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
+a STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `a`() RETURNS int(11)
return 42+13 latin1 latin1_swedish_ci latin1_swedish_ci
deallocate prepare abc;
drop function a;
@@ -3014,7 +3014,10 @@ deallocate prepare decode;
# Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
#
CREATE TABLE t1 (a DATETIME NOT NULL, b TINYINT);
-INSERT INTO t1 VALUES (0, 0),(0, 0);
+INSERT IGNORE INTO t1 VALUES (0, 0),(0, 0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
PREPARE stmt FROM "SELECT 1 FROM t1 WHERE
ROW(a, b) >= ROW('1', (SELECT 1 FROM t1 WHERE a > 1234))";
EXECUTE stmt;
diff --git a/mysql-test/r/ps_1general.result b/mysql-test/r/ps_1general.result
index e34855eee62..38043004ee3 100644
--- a/mysql-test/r/ps_1general.result
+++ b/mysql-test/r/ps_1general.result
@@ -309,7 +309,7 @@ Threads_running #
prepare stmt4 from ' show variables like ''sql_mode'' ';
execute stmt4;
Variable_name Value
-sql_mode NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+sql_mode STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
prepare stmt4 from ' show engine myisam logs ';
execute stmt4;
Type Name Status
diff --git a/mysql-test/r/ps_2myisam.result b/mysql-test/r/ps_2myisam.result
index 5ed5fa727fb..53fb195cb49 100644
--- a/mysql-test/r/ps_2myisam.result
+++ b/mysql-test/r/ps_2myisam.result
@@ -1303,9 +1303,11 @@ a b
2 two
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
+set sql_mode = default;
select a,b from t1 order by a;
a b
0 two
@@ -1784,7 +1786,7 @@ t5 CREATE TABLE `t5` (
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
`param04` longtext DEFAULT NULL,
- `const05` varbinary(3) NOT NULL,
+ `const05` varbinary(3) DEFAULT NULL,
`param05` longblob DEFAULT NULL,
`const06` varchar(10) NOT NULL,
`param06` longtext DEFAULT NULL,
@@ -1814,7 +1816,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8
-def test t5 t5 const05 const05 253 3 3 N 4225 0 63
+def test t5 t5 const05 const05 253 3 3 Y 128 0 63
def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 4097 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
@@ -2570,6 +2572,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
from t9 where c21 = 'O' ";
prepare my_delete from "delete from t9 where c21 = 'O' ";
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2579,6 +2582,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2593,6 +2597,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2602,6 +2607,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2616,6 +2622,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2625,6 +2632,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2639,6 +2647,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2648,6 +2657,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2662,6 +2672,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2673,6 +2684,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2687,6 +2699,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2698,6 +2711,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2712,6 +2726,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2723,6 +2738,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2737,6 +2753,7 @@ c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2748,6 +2765,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2763,6 +2781,7 @@ c12 -9999.9999
execute my_delete ;
test_sequence
-- insert into string columns --
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -2921,6 +2940,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -3127,6 +3147,7 @@ true
delete from t9 ;
test_sequence
-- insert into date/time columns --
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -3285,6 +3306,7 @@ Warnings:
Warning 1265 Data truncated for column 'c15' at row 1
Note 1265 Data truncated for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
diff --git a/mysql-test/r/ps_3innodb.result b/mysql-test/r/ps_3innodb.result
index eac8e5d4efd..da3f561928a 100644
--- a/mysql-test/r/ps_3innodb.result
+++ b/mysql-test/r/ps_3innodb.result
@@ -1286,9 +1286,11 @@ a b
2 two
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
+set sql_mode = default;
select a,b from t1 order by a;
a b
0 two
@@ -1767,7 +1769,7 @@ t5 CREATE TABLE `t5` (
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
`param04` longtext DEFAULT NULL,
- `const05` varbinary(3) NOT NULL,
+ `const05` varbinary(3) DEFAULT NULL,
`param05` longblob DEFAULT NULL,
`const06` varchar(10) NOT NULL,
`param06` longtext DEFAULT NULL,
@@ -1797,7 +1799,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8
-def test t5 t5 const05 const05 253 3 3 N 4225 0 63
+def test t5 t5 const05 const05 253 3 3 Y 128 0 63
def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 4097 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
@@ -2553,6 +2555,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
from t9 where c21 = 'O' ";
prepare my_delete from "delete from t9 where c21 = 'O' ";
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2562,6 +2565,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2576,6 +2580,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2585,6 +2590,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2599,6 +2605,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2608,6 +2615,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2622,6 +2630,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2631,6 +2640,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2645,6 +2655,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2656,6 +2667,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2670,6 +2682,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2681,6 +2694,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2695,6 +2709,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2706,6 +2721,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2720,6 +2736,7 @@ c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2731,6 +2748,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2746,6 +2764,7 @@ c12 -9999.9999
execute my_delete ;
test_sequence
-- insert into string columns --
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -2904,6 +2923,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -3110,6 +3130,7 @@ true
delete from t9 ;
test_sequence
-- insert into date/time columns --
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -3268,6 +3289,7 @@ Warnings:
Warning 1265 Data truncated for column 'c15' at row 1
Note 1265 Data truncated for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
diff --git a/mysql-test/r/ps_4heap.result b/mysql-test/r/ps_4heap.result
index d1ee954bbba..d45de3c024b 100644
--- a/mysql-test/r/ps_4heap.result
+++ b/mysql-test/r/ps_4heap.result
@@ -1287,9 +1287,11 @@ a b
2 two
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
+set sql_mode = default;
select a,b from t1 order by a;
a b
0 two
@@ -1768,7 +1770,7 @@ t5 CREATE TABLE `t5` (
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
`param04` longtext DEFAULT NULL,
- `const05` varbinary(3) NOT NULL,
+ `const05` varbinary(3) DEFAULT NULL,
`param05` longblob DEFAULT NULL,
`const06` varchar(10) NOT NULL,
`param06` longtext DEFAULT NULL,
@@ -1798,7 +1800,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8
-def test t5 t5 const05 const05 253 3 3 N 4225 0 63
+def test t5 t5 const05 const05 253 3 3 Y 128 0 63
def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 4097 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
@@ -2554,6 +2556,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
from t9 where c21 = 'O' ";
prepare my_delete from "delete from t9 where c21 = 'O' ";
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2563,6 +2566,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2577,6 +2581,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2586,6 +2591,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2600,6 +2606,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2609,6 +2616,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2623,6 +2631,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2632,6 +2641,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2646,6 +2656,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2657,6 +2668,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2671,6 +2683,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2682,6 +2695,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2696,6 +2710,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2707,6 +2722,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2721,6 +2737,7 @@ c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2732,6 +2749,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2747,6 +2765,7 @@ c12 -9999.9999
execute my_delete ;
test_sequence
-- insert into string columns --
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -2905,6 +2924,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -3111,6 +3131,7 @@ true
delete from t9 ;
test_sequence
-- insert into date/time columns --
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -3269,6 +3290,7 @@ Warnings:
Warning 1265 Data truncated for column 'c15' at row 1
Note 1265 Data truncated for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
diff --git a/mysql-test/r/ps_5merge.result b/mysql-test/r/ps_5merge.result
index a0baa842e4a..f5cedcda087 100644
--- a/mysql-test/r/ps_5merge.result
+++ b/mysql-test/r/ps_5merge.result
@@ -1330,9 +1330,11 @@ a b
2 two
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
+set sql_mode = default;
select a,b from t1 order by a;
a b
0 two
@@ -1705,7 +1707,7 @@ t5 CREATE TABLE `t5` (
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
`param04` longtext DEFAULT NULL,
- `const05` varbinary(3) NOT NULL,
+ `const05` varbinary(3) DEFAULT NULL,
`param05` longblob DEFAULT NULL,
`const06` varchar(10) NOT NULL,
`param06` longtext DEFAULT NULL,
@@ -1735,7 +1737,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8
-def test t5 t5 const05 const05 253 3 3 N 4225 0 63
+def test t5 t5 const05 const05 253 3 3 Y 128 0 63
def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 4097 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
@@ -2491,6 +2493,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
from t9 where c21 = 'O' ";
prepare my_delete from "delete from t9 where c21 = 'O' ";
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2500,6 +2503,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2514,6 +2518,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2523,6 +2528,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2537,6 +2543,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2546,6 +2553,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2560,6 +2568,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2569,6 +2578,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2583,6 +2593,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2594,6 +2605,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2608,6 +2620,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2619,6 +2632,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -2633,6 +2647,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2644,6 +2659,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2658,6 +2674,7 @@ c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -2669,6 +2686,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -2684,6 +2702,7 @@ c12 -9999.9999
execute my_delete ;
test_sequence
-- insert into string columns --
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -2842,6 +2861,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -3048,6 +3068,7 @@ true
delete from t9 ;
test_sequence
-- insert into date/time columns --
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -3206,6 +3227,7 @@ Warnings:
Warning 1265 Data truncated for column 'c15' at row 1
Note 1265 Data truncated for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -4684,9 +4706,11 @@ a b
2 two
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
Warnings:
Warning 1048 Column 'a' cannot be null
+set sql_mode = default;
select a,b from t1 order by a;
a b
0 two
@@ -5059,7 +5083,7 @@ t5 CREATE TABLE `t5` (
`param03` double DEFAULT NULL,
`const04` varchar(3) NOT NULL,
`param04` longtext DEFAULT NULL,
- `const05` varbinary(3) NOT NULL,
+ `const05` varbinary(3) DEFAULT NULL,
`param05` longblob DEFAULT NULL,
`const06` varchar(10) NOT NULL,
`param06` longtext DEFAULT NULL,
@@ -5089,7 +5113,7 @@ def test t5 t5 const03 const03 5 17 1 N 36865 31 63
def test t5 t5 param03 param03 5 23 1 Y 32768 31 63
def test t5 t5 const04 const04 253 3 3 N 4097 0 8
def test t5 t5 param04 param04 252 4294967295 3 Y 16 0 8
-def test t5 t5 const05 const05 253 3 3 N 4225 0 63
+def test t5 t5 const05 const05 253 3 3 Y 128 0 63
def test t5 t5 param05 param05 252 4294967295 3 Y 144 0 63
def test t5 t5 const06 const06 253 10 10 N 4097 0 8
def test t5 t5 param06 param06 252 4294967295 10 Y 16 0 8
@@ -5845,6 +5869,7 @@ prepare my_select from "select c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c12
from t9 where c21 = 'O' ";
prepare my_delete from "delete from t9 where c21 = 'O' ";
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5854,6 +5879,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -5868,6 +5894,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5877,6 +5904,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -5891,6 +5919,7 @@ c10 9.223372036854776e18
c12 9999.9999
execute my_delete ;
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5900,6 +5929,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -5914,6 +5944,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5923,6 +5954,7 @@ Warning 1264 Out of range value for column 'c3' at row 1
Warning 1264 Out of range value for column 'c4' at row 1
Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -5937,6 +5969,7 @@ c10 -9.223372036854776e18
c12 -9999.9999
execute my_delete ;
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5948,6 +5981,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -5962,6 +5996,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5973,6 +6008,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 127
c2 32767
@@ -5987,6 +6023,7 @@ c10 1.111111111111111e50
c12 9999.9999
execute my_delete ;
set @arg00= -1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -5998,6 +6035,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -6012,6 +6050,7 @@ c10 -1.111111111111111e50
c12 -9999.9999
execute my_delete ;
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
Warnings:
@@ -6023,6 +6062,7 @@ Warning 1264 Out of range value for column 'c5' at row 1
Warning 1264 Out of range value for column 'c6' at row 1
Warning 1264 Out of range value for column 'c7' at row 1
Warning 1264 Out of range value for column 'c12' at row 1
+set sql_mode = default;
execute my_select ;
c1 -128
c2 -32768
@@ -6038,6 +6078,7 @@ c12 -9999.9999
execute my_delete ;
test_sequence
-- insert into string columns --
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -6196,6 +6237,7 @@ execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
@@ -6402,6 +6444,7 @@ true
delete from t9 ;
test_sequence
-- insert into date/time columns --
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -6560,6 +6603,7 @@ Warnings:
Warning 1265 Data truncated for column 'c15' at row 1
Note 1265 Data truncated for column 'c16' at row 1
Warning 1264 Out of range value for column 'c17' at row 1
+set sql_mode = default;
set @arg00= 'abc' ;
set @arg00= NULL ;
insert into t9
diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result
index d34c96cd568..c694ff5655b 100644
--- a/mysql-test/r/query_cache.result
+++ b/mysql-test/r/query_cache.result
@@ -955,10 +955,12 @@ flush query cache;
drop table t1, t2;
set GLOBAL query_cache_size=1355776;
flush status;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`date` datetime NOT NULL default '0000-00-00 00:00:00',
KEY `date` (`date`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('20050326');
INSERT INTO t1 VALUES ('20050325');
SELECT COUNT(*) FROM t1 WHERE date BETWEEN '20050326' AND '20050327 invalid';
diff --git a/mysql-test/r/quick_select_4161.result b/mysql-test/r/quick_select_4161.result
index 30ae0a09edc..d2842d3e113 100644
--- a/mysql-test/r/quick_select_4161.result
+++ b/mysql-test/r/quick_select_4161.result
@@ -1,3 +1,4 @@
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
diff --git a/mysql-test/r/range.result b/mysql-test/r/range.result
index 5027fffe047..54badb777c1 100644
--- a/mysql-test/r/range.result
+++ b/mysql-test/r/range.result
@@ -1,10 +1,12 @@
drop table if exists t1, t2, t3, t10, t100;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
event_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (event_date,type,event_id)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('1999-07-10',100100,24), ('1999-07-11',100100,25),
('1999-07-13',100600,0), ('1999-07-13',100600,4), ('1999-07-13',100600,26),
('1999-07-14',100600,10), ('1999-07-15',100600,16), ('1999-07-15',100800,45),
@@ -44,6 +46,7 @@ event_date type event_id
1999-07-14 100600 10
1999-07-15 100600 16
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
PAPER_ID smallint(6) DEFAULT '0' NOT NULL,
YEAR smallint(6) DEFAULT '0' NOT NULL,
@@ -52,6 +55,7 @@ CLOSED tinyint(4) DEFAULT '0' NOT NULL,
ISS_DATE date DEFAULT '0000-00-00' NOT NULL,
PRIMARY KEY (PAPER_ID,YEAR,ISSUE)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3,1999,34,0,'1999-07-12'), (1,1999,111,0,'1999-03-23'),
(1,1999,222,0,'1999-03-23'), (3,1999,33,0,'1999-07-12'),
(3,1999,32,0,'1999-07-12'), (3,1999,31,0,'1999-07-12'),
@@ -1107,6 +1111,7 @@ EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
item char(20) NOT NULL default '',
started datetime NOT NULL default '0000-00-00 00:00:00',
@@ -1142,6 +1147,7 @@ item started price
A1 2005-11-01 08:00:00 1000.000
A1 2005-11-15 00:00:00 2000.000
DROP TABLE t1;
+SET sql_mode = DEFAULT;
BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
@@ -1584,9 +1590,12 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
@@ -1599,9 +1608,9 @@ Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''
NULL
@@ -1609,7 +1618,9 @@ Warnings:
Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('', '%Y-%m-%d');
str_to_date('', '%Y-%m-%d')
-0000-00-00
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
DROP TABLE t1, t2;
#
# Bug#48459: valgrind errors with query using 'Range checked for each
diff --git a/mysql-test/r/range_mrr_icp.result b/mysql-test/r/range_mrr_icp.result
index 7d009070150..d601e715089 100644
--- a/mysql-test/r/range_mrr_icp.result
+++ b/mysql-test/r/range_mrr_icp.result
@@ -1,12 +1,14 @@
set @mrr_icp_extra_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
drop table if exists t1, t2, t3, t10, t100;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
event_date date DEFAULT '0000-00-00' NOT NULL,
type int(11) DEFAULT '0' NOT NULL,
event_id int(11) DEFAULT '0' NOT NULL,
PRIMARY KEY (event_date,type,event_id)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('1999-07-10',100100,24), ('1999-07-11',100100,25),
('1999-07-13',100600,0), ('1999-07-13',100600,4), ('1999-07-13',100600,26),
('1999-07-14',100600,10), ('1999-07-15',100600,16), ('1999-07-15',100800,45),
@@ -46,6 +48,7 @@ event_date type event_id
1999-07-14 100600 10
1999-07-15 100600 16
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
PAPER_ID smallint(6) DEFAULT '0' NOT NULL,
YEAR smallint(6) DEFAULT '0' NOT NULL,
@@ -54,6 +57,7 @@ CLOSED tinyint(4) DEFAULT '0' NOT NULL,
ISS_DATE date DEFAULT '0000-00-00' NOT NULL,
PRIMARY KEY (PAPER_ID,YEAR,ISSUE)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3,1999,34,0,'1999-07-12'), (1,1999,111,0,'1999-03-23'),
(1,1999,222,0,'1999-03-23'), (3,1999,33,0,'1999-07-12'),
(3,1999,32,0,'1999-07-12'), (3,1999,31,0,'1999-07-12'),
@@ -1109,6 +1113,7 @@ EXPLAIN SELECT * FROM t1 WHERE 0 NOT BETWEEN b AND c;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge idx1,idx2 idx1,idx2 4,4 NULL 4 Using sort_union(idx1,idx2); Using where
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
item char(20) NOT NULL default '',
started datetime NOT NULL default '0000-00-00 00:00:00',
@@ -1144,6 +1149,7 @@ item started price
A1 2005-11-01 08:00:00 1000.000
A1 2005-11-15 00:00:00 2000.000
DROP TABLE t1;
+SET sql_mode = DEFAULT;
BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
@@ -1586,9 +1592,12 @@ SELECT str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') >= '' AND
str_to_date('2007-10-00', '%Y-%m-%d') <= '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
SELECT str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
str_to_date('2007-20-00', '%Y-%m-%d') <= '';
str_to_date('2007-20-00', '%Y-%m-%d') >= '2007/10/20' AND
@@ -1601,9 +1610,9 @@ Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20';
str_to_date('2007-10-00', '%Y-%m-%d') BETWEEN '' AND '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
SELECT str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND '';
str_to_date('2007-20-00', '%Y-%m-%d') BETWEEN '2007/10/20' AND ''
NULL
@@ -1611,7 +1620,9 @@ Warnings:
Warning 1411 Incorrect datetime value: '2007-20-00' for function str_to_date
SELECT str_to_date('', '%Y-%m-%d');
str_to_date('', '%Y-%m-%d')
-0000-00-00
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
DROP TABLE t1, t2;
#
# Bug#48459: valgrind errors with query using 'Range checked for each
diff --git a/mysql-test/r/round.result b/mysql-test/r/round.result
index 49a00885f34..a3e9f18843d 100644
--- a/mysql-test/r/round.result
+++ b/mysql-test/r/round.result
@@ -3,7 +3,7 @@ CREATE TABLE t1 (sint8 tinyint not null);
INSERT INTO t1 VALUES ('0.1');
INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('127.4');
-INSERT INTO t1 VALUES ('127.5');
+INSERT IGNORE INTO t1 VALUES ('127.5');
Warnings:
Warning 1264 Out of range value for column 'sint8' at row 1
INSERT INTO t1 VALUES ('-0.1');
@@ -11,7 +11,7 @@ INSERT INTO t1 VALUES ('-0.5');
INSERT INTO t1 VALUES ('-127.4');
INSERT INTO t1 VALUES ('-127.5');
INSERT INTO t1 VALUES ('-128.4');
-INSERT INTO t1 VALUES ('-128.5');
+INSERT IGNORE INTO t1 VALUES ('-128.5');
Warnings:
Warning 1264 Out of range value for column 'sint8' at row 1
SELECT * FROM t1;
@@ -33,11 +33,11 @@ INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('127.4');
INSERT INTO t1 VALUES ('127.5');
INSERT INTO t1 VALUES ('-0.1');
-INSERT INTO t1 VALUES ('-0.5');
+INSERT IGNORE INTO t1 VALUES ('-0.5');
Warnings:
Warning 1264 Out of range value for column 'uint8' at row 1
INSERT INTO t1 VALUES ('255.4');
-INSERT INTO t1 VALUES ('255.5');
+INSERT IGNORE INTO t1 VALUES ('255.5');
Warnings:
Warning 1264 Out of range value for column 'uint8' at row 1
SELECT * FROM t1;
@@ -55,7 +55,7 @@ CREATE TABLE t1 (sint16 smallint not null);
INSERT INTO t1 VALUES ('0.1');
INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('32767.4');
-INSERT INTO t1 VALUES ('32767.5');
+INSERT IGNORE INTO t1 VALUES ('32767.5');
Warnings:
Warning 1264 Out of range value for column 'sint16' at row 1
INSERT INTO t1 VALUES ('-0.1');
@@ -63,7 +63,7 @@ INSERT INTO t1 VALUES ('-0.5');
INSERT INTO t1 VALUES ('-32767.4');
INSERT INTO t1 VALUES ('-32767.5');
INSERT INTO t1 VALUES ('-32768.4');
-INSERT INTO t1 VALUES ('-32768.5');
+INSERT IGNORE INTO t1 VALUES ('-32768.5');
Warnings:
Warning 1264 Out of range value for column 'sint16' at row 1
SELECT * FROM t1;
@@ -85,11 +85,11 @@ INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('32767.4');
INSERT INTO t1 VALUES ('32767.5');
INSERT INTO t1 VALUES ('-0.1');
-INSERT INTO t1 VALUES ('-0.5');
+INSERT IGNORE INTO t1 VALUES ('-0.5');
Warnings:
Warning 1264 Out of range value for column 'uint16' at row 1
INSERT INTO t1 VALUES ('65535.4');
-INSERT INTO t1 VALUES ('65535.5');
+INSERT IGNORE INTO t1 VALUES ('65535.5');
Warnings:
Warning 1264 Out of range value for column 'uint16' at row 1
SELECT * FROM t1;
@@ -107,7 +107,7 @@ CREATE TABLE t1 (sint24 mediumint not null);
INSERT INTO t1 VALUES ('0.1');
INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('8388607.4');
-INSERT INTO t1 VALUES ('8388607.5');
+INSERT IGNORE INTO t1 VALUES ('8388607.5');
Warnings:
Warning 1264 Out of range value for column 'sint24' at row 1
INSERT INTO t1 VALUES ('-0.1');
@@ -115,7 +115,7 @@ INSERT INTO t1 VALUES ('-0.5');
INSERT INTO t1 VALUES ('-8388607.4');
INSERT INTO t1 VALUES ('-8388607.5');
INSERT INTO t1 VALUES ('-8388608.4');
-INSERT INTO t1 VALUES ('-8388608.5');
+INSERT IGNORE INTO t1 VALUES ('-8388608.5');
Warnings:
Warning 1264 Out of range value for column 'sint24' at row 1
SELECT * FROM t1;
@@ -137,11 +137,11 @@ INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('8388607.4');
INSERT INTO t1 VALUES ('8388607.5');
INSERT INTO t1 VALUES ('-0.1');
-INSERT INTO t1 VALUES ('-0.5');
+INSERT IGNORE INTO t1 VALUES ('-0.5');
Warnings:
Warning 1264 Out of range value for column 'uint24' at row 1
INSERT INTO t1 VALUES ('16777215.4');
-INSERT INTO t1 VALUES ('16777215.5');
+INSERT IGNORE INTO t1 VALUES ('16777215.5');
Warnings:
Warning 1264 Out of range value for column 'uint24' at row 1
SELECT * FROM t1;
@@ -159,7 +159,7 @@ CREATE TABLE t1 (sint64 bigint not null);
INSERT INTO t1 VALUES ('0.1');
INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('9223372036854775807.4');
-INSERT INTO t1 VALUES ('9223372036854775807.5');
+INSERT IGNORE INTO t1 VALUES ('9223372036854775807.5');
Warnings:
Warning 1264 Out of range value for column 'sint64' at row 1
INSERT INTO t1 VALUES ('-0.1');
@@ -167,7 +167,7 @@ INSERT INTO t1 VALUES ('-0.5');
INSERT INTO t1 VALUES ('-9223372036854775807.4');
INSERT INTO t1 VALUES ('-9223372036854775807.5');
INSERT INTO t1 VALUES ('-9223372036854775808.4');
-INSERT INTO t1 VALUES ('-9223372036854775808.5');
+INSERT IGNORE INTO t1 VALUES ('-9223372036854775808.5');
Warnings:
Warning 1264 Out of range value for column 'sint64' at row 1
SELECT * FROM t1;
@@ -189,11 +189,11 @@ INSERT INTO t1 VALUES ('0.5');
INSERT INTO t1 VALUES ('9223372036854775807.4');
INSERT INTO t1 VALUES ('9223372036854775807.5');
INSERT INTO t1 VALUES ('-0.1');
-INSERT INTO t1 VALUES ('-0.5');
+INSERT IGNORE INTO t1 VALUES ('-0.5');
Warnings:
Warning 1264 Out of range value for column 'uint64' at row 1
INSERT INTO t1 VALUES ('18446744073709551615.4');
-INSERT INTO t1 VALUES ('18446744073709551615.5');
+INSERT IGNORE INTO t1 VALUES ('18446744073709551615.5');
Warnings:
Warning 1264 Out of range value for column 'uint64' at row 1
INSERT INTO t1 VALUES ('1844674407370955161.0');
diff --git a/mysql-test/r/row.result b/mysql-test/r/row.result
index 9b796c24354..1af4b832119 100644
--- a/mysql-test/r/row.result
+++ b/mysql-test/r/row.result
@@ -467,7 +467,10 @@ drop table t1,t2;
# Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
#
CREATE TABLE t1 (a DATETIME NOT NULL, b TINYINT);
-INSERT INTO t1 VALUES (0, 0),(0, 0);
+INSERT IGNORE INTO t1 VALUES (0, 0),(0, 0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
SELECT 1 FROM t1 WHERE ROW(a, b) >=
ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
1
diff --git a/mysql-test/r/select.result b/mysql-test/r/select.result
index a7c4c76dc8c..4ac61ea7d2c 100644
--- a/mysql-test/r/select.result
+++ b/mysql-test/r/select.result
@@ -2817,7 +2817,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01')
1 1 1 1
DROP TABLE t1;
create table t1(a bigint unsigned, b bigint);
-insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
(0x10000000000000000, 0x10000000000000000),
(0x8fffffffffffffff, 0x8fffffffffffffff);
Warnings:
@@ -4166,12 +4166,16 @@ str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34'
1
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
@@ -4196,38 +4200,42 @@ Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34'
NULL
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4448,7 +4456,7 @@ DROP TABLE t1;
# memory
#
CREATE TABLE t1(a INT NOT NULL, b YEAR);
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
CREATE TABLE t2(c INT);
@@ -4549,7 +4557,7 @@ DROP TABLE t1;
SET @old_sort_buffer_size= @@session.sort_buffer_size;
SET @@sort_buffer_size= 40000;
CREATE TABLE t1(a CHAR(0) NOT NULL);
-INSERT INTO t1 VALUES (0), (0), (0);
+INSERT IGNORE INTO t1 VALUES (0), (0), (0);
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
@@ -4559,7 +4567,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT a FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
-INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
+INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
@@ -4632,9 +4640,12 @@ date_key date NOT NULL,
date_nokey date,
varchar_key varchar(1)
);
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
(1,1,1,'0000-00-00',NULL,NULL),
(1,1,1,'0000-00-00',NULL,NULL);
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
+Warning 1264 Out of range value for column 'date_key' at row 2
SELECT 1 FROM t2 WHERE pk > ANY (SELECT 1 FROM t2);
1
SELECT COUNT(DISTINCT 1) FROM t2
@@ -4708,7 +4719,7 @@ KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `varchar_key` (`varchar_key`)
);
-INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
+INSERT IGNORE INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -4718,7 +4729,7 @@ CREATE TABLE `BB` (
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`)
);
-INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
+INSERT IGNORE INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
SELECT table1 . `pk` AS field1
FROM
(BB AS table1 INNER JOIN
@@ -4870,7 +4881,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL);
INSERT INTO t1 VALUES (), (), ();
EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
1
@@ -5279,6 +5290,8 @@ DROP TABLE t1;
#
CREATE TABLE t1 (f1 date);
INSERT IGNORE INTO t1 VALUES ('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 HAVING f1 = 'zz';
f1
diff --git a/mysql-test/r/select_jcl6.result b/mysql-test/r/select_jcl6.result
index 19d1733c52e..40f96d57d28 100644
--- a/mysql-test/r/select_jcl6.result
+++ b/mysql-test/r/select_jcl6.result
@@ -2828,7 +2828,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01')
1 1 1 1
DROP TABLE t1;
create table t1(a bigint unsigned, b bigint);
-insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
(0x10000000000000000, 0x10000000000000000),
(0x8fffffffffffffff, 0x8fffffffffffffff);
Warnings:
@@ -4177,12 +4177,16 @@ str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34'
1
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
@@ -4207,38 +4211,42 @@ Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34'
NULL
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4459,7 +4467,7 @@ DROP TABLE t1;
# memory
#
CREATE TABLE t1(a INT NOT NULL, b YEAR);
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
CREATE TABLE t2(c INT);
@@ -4560,7 +4568,7 @@ DROP TABLE t1;
SET @old_sort_buffer_size= @@session.sort_buffer_size;
SET @@sort_buffer_size= 40000;
CREATE TABLE t1(a CHAR(0) NOT NULL);
-INSERT INTO t1 VALUES (0), (0), (0);
+INSERT IGNORE INTO t1 VALUES (0), (0), (0);
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
@@ -4570,7 +4578,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT a FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
-INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
+INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
@@ -4643,9 +4651,12 @@ date_key date NOT NULL,
date_nokey date,
varchar_key varchar(1)
);
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
(1,1,1,'0000-00-00',NULL,NULL),
(1,1,1,'0000-00-00',NULL,NULL);
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
+Warning 1264 Out of range value for column 'date_key' at row 2
SELECT 1 FROM t2 WHERE pk > ANY (SELECT 1 FROM t2);
1
SELECT COUNT(DISTINCT 1) FROM t2
@@ -4719,7 +4730,7 @@ KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `varchar_key` (`varchar_key`)
);
-INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
+INSERT IGNORE INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -4729,7 +4740,7 @@ CREATE TABLE `BB` (
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`)
);
-INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
+INSERT IGNORE INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
SELECT table1 . `pk` AS field1
FROM
(BB AS table1 INNER JOIN
@@ -4881,7 +4892,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL);
INSERT INTO t1 VALUES (), (), ();
EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
1
@@ -5290,6 +5301,8 @@ DROP TABLE t1;
#
CREATE TABLE t1 (f1 date);
INSERT IGNORE INTO t1 VALUES ('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 HAVING f1 = 'zz';
f1
diff --git a/mysql-test/r/select_pkeycache.result b/mysql-test/r/select_pkeycache.result
index a7c4c76dc8c..4ac61ea7d2c 100644
--- a/mysql-test/r/select_pkeycache.result
+++ b/mysql-test/r/select_pkeycache.result
@@ -2817,7 +2817,7 @@ i='1e+01' i=1e+01 i in (1e+01,1e+01) i in ('1e+01','1e+01')
1 1 1 1
DROP TABLE t1;
create table t1(a bigint unsigned, b bigint);
-insert into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
+insert ignore into t1 values (0xfffffffffffffffff, 0xfffffffffffffffff),
(0x10000000000000000, 0x10000000000000000),
(0x8fffffffffffffff, 0x8fffffffffffffff);
Warnings:
@@ -4166,12 +4166,16 @@ str_to_date('2007-02-30 12:34','%Y-%m-%d %H:%i') = '2007-02-30 12:34'
1
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00';
str_to_date('2007-10-00','%Y-%m-%d') between '2007/09/01 00:00:00'
and '2007/10/20 00:00:00'
-1
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=TRADITIONAL;
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '2007-10-00 12:34'
@@ -4196,38 +4200,42 @@ Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
set SQL_MODE=DEFAULT;
select str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20';
str_to_date('2007-10-00','%Y-%m-%d') between '' and '2007/10/20'
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00' for function str_to_date
select str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20';
str_to_date('','%Y-%m-%d') between '2007/10/01' and '2007/10/20'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date('','%Y-%m-%d %H:%i') = '2007-10-01 12:34'
-0
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34';
str_to_date(NULL,'%Y-%m-%d %H:%i') = '2007-10-01 12:34'
NULL
select str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = '';
str_to_date('2007-10-00 12:34','%Y-%m-%d %H:%i') = ''
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '2007-10-00 12:34' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('1','%Y-%m-%d') = '1';
str_to_date('1','%Y-%m-%d') = '1'
-0
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: '1'
+Warning 1411 Incorrect datetime value: '1' for function str_to_date
select str_to_date('','%Y-%m-%d') = '';
str_to_date('','%Y-%m-%d') = ''
-1
+NULL
Warnings:
-Warning 1292 Incorrect datetime value: ''
+Warning 1411 Incorrect datetime value: '' for function str_to_date
select str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01';
str_to_date('2000-01-01','%Y-%m-%d') between '1000-01-01' and '2001-01-01'
1
@@ -4448,7 +4456,7 @@ DROP TABLE t1;
# memory
#
CREATE TABLE t1(a INT NOT NULL, b YEAR);
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
CREATE TABLE t2(c INT);
@@ -4549,7 +4557,7 @@ DROP TABLE t1;
SET @old_sort_buffer_size= @@session.sort_buffer_size;
SET @@sort_buffer_size= 40000;
CREATE TABLE t1(a CHAR(0) NOT NULL);
-INSERT INTO t1 VALUES (0), (0), (0);
+INSERT IGNORE INTO t1 VALUES (0), (0), (0);
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
@@ -4559,7 +4567,7 @@ id select_type table type possible_keys key key_len ref rows Extra
SELECT a FROM t1 ORDER BY a;
DROP TABLE t1;
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
-INSERT INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
+INSERT IGNORE INTO t1 VALUES (0, 0, 0), (0, 0, 2), (0, 0, 1);
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a, t11.b, t11.c FROM t1 t11, t1 t12;
@@ -4632,9 +4640,12 @@ date_key date NOT NULL,
date_nokey date,
varchar_key varchar(1)
);
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
(1,1,1,'0000-00-00',NULL,NULL),
(1,1,1,'0000-00-00',NULL,NULL);
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
+Warning 1264 Out of range value for column 'date_key' at row 2
SELECT 1 FROM t2 WHERE pk > ANY (SELECT 1 FROM t2);
1
SELECT COUNT(DISTINCT 1) FROM t2
@@ -4708,7 +4719,7 @@ KEY `date_key` (`date_key`),
KEY `time_key` (`time_key`),
KEY `varchar_key` (`varchar_key`)
);
-INSERT INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
+INSERT IGNORE INTO `B` VALUES ('2003-07-28','2003-07-28','15:13:38','0000-00-00 00:00:00','f'),('0000-00-00','0000-00-00','00:05:48','2004-07-02 14:34:13','x');
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -4718,7 +4729,7 @@ CREATE TABLE `BB` (
PRIMARY KEY (`pk`),
KEY `date_key` (`date_key`)
);
-INSERT INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
+INSERT IGNORE INTO `BB` VALUES (10,8,'0000-00-00','i','0000-00-00'),(11,0,'2005-08-18','','2005-08-18');
SELECT table1 . `pk` AS field1
FROM
(BB AS table1 INNER JOIN
@@ -4870,7 +4881,7 @@ CREATE TABLE t1(a ENUM('') NOT NULL);
INSERT INTO t1 VALUES (), (), ();
EXPLAIN SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
id select_type table type possible_keys key key_len ref rows Extra
-1 SIMPLE t1 ALL NULL NULL NULL NULL 3
+1 SIMPLE t1 ALL NULL NULL NULL NULL 3 Using filesort
SELECT 1 FROM t1 ORDER BY a COLLATE latin1_german2_ci;
1
1
@@ -5279,6 +5290,8 @@ DROP TABLE t1;
#
CREATE TABLE t1 (f1 date);
INSERT IGNORE INTO t1 VALUES ('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 1
CREATE OR REPLACE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 HAVING f1 = 'zz';
f1
diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result
index 64199f983ee..a77c74a3a60 100644
--- a/mysql-test/r/selectivity.result
+++ b/mysql-test/r/selectivity.result
@@ -1520,7 +1520,10 @@ set use_stat_tables='preferably';
set optimizer_use_condition_selectivity=4;
set HISTOGRAM_SIZE = 255;
CREATE TABLE t1 (t TIME, d DATE NOT NULL);
-INSERT INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00');
+INSERT IGNORE INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 1
+Warning 1264 Out of range value for column 'd' at row 2
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result
index a05c14c8e71..b06bd4ea832 100644
--- a/mysql-test/r/selectivity_innodb.result
+++ b/mysql-test/r/selectivity_innodb.result
@@ -1530,7 +1530,10 @@ set use_stat_tables='preferably';
set optimizer_use_condition_selectivity=4;
set HISTOGRAM_SIZE = 255;
CREATE TABLE t1 (t TIME, d DATE NOT NULL);
-INSERT INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00');
+INSERT IGNORE INTO t1 VALUES ('10:00:00', '0000-00-00'),('11:00:00','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'd' at row 1
+Warning 1264 Out of range value for column 'd' at row 2
ANALYZE TABLE t1;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
diff --git a/mysql-test/r/set_statement.result b/mysql-test/r/set_statement.result
index 4cb143f6ba5..af9e1f8643d 100644
--- a/mysql-test/r/set_statement.result
+++ b/mysql-test/r/set_statement.result
@@ -642,7 +642,7 @@ SELECT @@myisam_sort_buffer_size,
'# Pre-STATEMENT variable value
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
''
''
SET STATEMENT sql_mode='ansi' FOR PREPARE stmt FROM 'SELECT "t1".* FROM t1';
@@ -659,7 +659,7 @@ deallocate prepare stmt;
'# Post-STATEMENT
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
check the same behaviour in normal set
SET sql_mode='ansi';
PREPARE stmt FROM 'SELECT "t1".* FROM t1';
@@ -675,7 +675,7 @@ ALTER TABLE t1 drop COLUMN v3;
deallocate prepare stmt;
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET sql_mode='ansi';
SELECT @@sql_mode;
@@sql_mode
@@ -704,7 +704,7 @@ ALTER TABLE t1 drop COLUMN v3;
drop procedure p6;
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# SET and the statement parsed as one unit before the SET takes effect
SET STATEMENT sql_mode='ansi' FOR
CREATE PROCEDURE p6() BEGIN
@@ -715,7 +715,7 @@ ERROR 42000: You have an error in your SQL syntax; check the manual that corresp
END' at line 4
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
SET sql_mode='ansi';
SELECT @@sql_mode;
@@sql_mode
@@ -732,7 +732,7 @@ v1 v2
SET sql_mode=default;
SELECT @@sql_mode;
@@sql_mode
-NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
# SET and the statement parsed as one unit before the SET takes effect
SET STATEMENT sql_mode='ansi' FOR
BEGIN NOT ATOMIC
diff --git a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
index 7ef480a6019..11aa6f62452 100644
--- a/mysql-test/r/show_check.result
+++ b/mysql-test/r/show_check.result
@@ -305,6 +305,7 @@ f double(5,0) NULL YES NULL select,insert,update,references
h float(3,2) NULL YES NULL select,insert,update,references
i float(3,0) NULL YES NULL select,insert,update,references
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
type_bool bool not null default 0,
type_tiny tinyint not null auto_increment primary key,
@@ -361,6 +362,7 @@ select * from t1;
type_bool type_tiny type_short type_mediumint type_bigint type_decimal type_numeric empty_char type_char type_varchar type_timestamp type_date type_time type_datetime type_year type_enum type_set type_tinyblob type_blob type_medium_blob type_long_blob
0 1 NULL NULL NULL NULL NULL NULL NULL NULL 2003-02-07 10:00:01 0000-00-00 00:00:00 0000-00-00 00:00:00 NULL NULL NULL NULL NULL NULL NULL
drop table t1;
+set sql_mode = default;
create table t1 (a int not null);
create table t2 select max(a) from t1;
show columns from t2;
@@ -1010,13 +1012,13 @@ def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1
def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33
def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS CREATED Created 12 22 22 Y 128 2 63
-def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 42 N 1 0 33
+def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 24576 118 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 567 14 N 1 0 33
def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 96 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 96 6 N 1 0 33
def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 96 17 N 1 0 33
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-t1_bi INSERT t1 SET @a = 1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost binary binary latin1_swedish_ci
+t1_bi INSERT t1 SET @a = 1 BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost binary binary latin1_swedish_ci
----------------------------------------------------------------
SELECT
TRIGGER_CATALOG,
@@ -1054,10 +1056,10 @@ def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFER
def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33
def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33
def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33
-def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 42 N 1 0 33
+def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 24576 118 N 1 0 33
def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 567 14 N 1 0 33
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER
-def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
+def test t1_bi INSERT def test t1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
SELECT CREATED FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_name='t1_bi';
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def information_schema TRIGGERS TRIGGERS CREATED CREATED 12 22 22 Y 128 2 63
@@ -1094,13 +1096,13 @@ def test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary UNDEFIN
SHOW CREATE PROCEDURE p1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Procedure 253 192 2 N 1 39 33
-def sql_mode 253 126 42 N 1 39 33
+def sql_mode 253 354 118 N 1 39 33
def Create Procedure 253 3072 59 Y 0 39 33
def character_set_client 253 96 6 N 1 39 33
def collation_connection 253 96 6 N 1 39 33
def Database Collation 253 96 17 N 1 39 33
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1 binary binary latin1_swedish_ci
----------------------------------------------------------------
SELECT
@@ -1140,22 +1142,22 @@ def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9
def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
-def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 42 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 118 N 1 0 33
def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
-p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
+p1 def test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
----------------------------------------------------------------
SHOW CREATE FUNCTION f1;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def Function 253 192 2 N 1 39 33
-def sql_mode 253 126 42 N 1 39 33
+def sql_mode 253 354 118 N 1 39 33
def Create Function 253 3072 74 Y 0 39 33
def character_set_client 253 96 6 N 1 39 33
def collation_connection 253 96 6 N 1 39 33
def Database Collation 253 96 17 N 1 39 33
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
+f1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS int(11)
RETURN 1 binary binary latin1_swedish_ci
----------------------------------------------------------------
SELECT
@@ -1195,11 +1197,11 @@ def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9
def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
-def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 42 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 24576 118 N 1 0 33
def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 252 589815 0 N 17 0 33
def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 567 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
-f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
+f1 def test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS SQL NULL DEFINER STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost
----------------------------------------------------------------
DROP DATABASE mysqltest1;
DROP TABLE t1;
@@ -1369,69 +1371,69 @@ CREATE TABLE t1(c1 INT);
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1;
SHOW CREATE TRIGGER t1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CREATE PROCEDURE p1() SHOW CREATE TRIGGER t1_bi;
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
CALL p1();
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
PREPARE stmt1 FROM 'SHOW CREATE TRIGGER t1_bi';
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
EXECUTE stmt1;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a = 1 latin1 latin1_swedish_ci latin1_swedish_ci #
DROP TABLE t1;
DROP PROCEDURE p1;
DEALLOCATE PREPARE stmt1;
@@ -1455,20 +1457,20 @@ View Create View character_set_client collation_connection
v1 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v1` AS select 'тест' AS `test` koi8r koi8r_general_ci
SHOW CREATE PROCEDURE p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 'тест' AS test koi8r koi8r_general_ci latin1_swedish_ci
SHOW CREATE FUNCTION f1;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS char(10) CHARSET latin1
+f1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f1`() RETURNS char(10) CHARSET latin1
RETURN 'тест' koi8r koi8r_general_ci latin1_swedish_ci
SHOW CREATE TRIGGER t1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1
FOR EACH ROW
SET NEW.c1 = 'тест' koi8r koi8r_general_ci latin1_swedish_ci #
SHOW CREATE EVENT ev1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-ev1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'тест' AS test koi8r koi8r_general_ci latin1_swedish_ci
+ev1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`root`@`localhost` EVENT `ev1` ON SCHEDULE AT '2030-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO SELECT 'тест' AS test koi8r koi8r_general_ci latin1_swedish_ci
DROP VIEW v1;
DROP PROCEDURE p1;
DROP FUNCTION f1;
@@ -1538,7 +1540,7 @@ LOCK TABLE t1 WRITE;
connection default;
SHOW CREATE TRIGGER t1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci #
connection con1;
UNLOCK TABLES;
# Test 2: ALTER TABLE with SHOW CREATE TRIGGER in transaction
@@ -1546,7 +1548,7 @@ connection default;
START TRANSACTION;
SHOW CREATE TRIGGER t1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-t1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci #
+t1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW SET new.a = 1 utf8 utf8_general_ci latin1_swedish_ci #
connection con1;
ALTER TABLE t1 CHARACTER SET = utf8;
disconnect con1;
diff --git a/mysql-test/r/signal.result b/mysql-test/r/signal.result
index a5eb24442b4..f05e357104d 100644
--- a/mysql-test/r/signal.result
+++ b/mysql-test/r/signal.result
@@ -1118,6 +1118,7 @@ end $$
call test_signal() $$
ERROR 42000: Variable 'MYSQL_ERRNO' can't be set to the value of '999999999999999999999999999999999999999999999999999'
drop procedure test_signal $$
+SET sql_mode= '' $$
create procedure test_signal()
begin
DECLARE aaax VARCHAR(65);
@@ -1177,6 +1178,7 @@ Warning 1647 Data truncated for condition item 'CURSOR_NAME'
Warning 1647 Data truncated for condition item 'MESSAGE_TEXT'
Warning 10000 11111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111112222222222222222222288888888
drop procedure test_signal $$
+set sql_mode = DEFAULT $$
create procedure test_signal()
begin
DECLARE warn CONDITION FOR SQLSTATE "01234";
@@ -1501,7 +1503,7 @@ select "before RESIGNAL";
RESIGNAL;
select "after RESIGNAL";
end;
-insert into t_warn set a= 9999999999999999;
+insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
before RESIGNAL
@@ -1618,7 +1620,7 @@ MESSAGE_TEXT = "RESIGNAL of a warning",
MYSQL_ERRNO = 5555 ;
select "after RESIGNAL";
end;
-insert into t_warn set a= 9999999999999999;
+insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
before RESIGNAL
@@ -1892,7 +1894,7 @@ MESSAGE_TEXT = "RESIGNAL to a warning",
MYSQL_ERRNO = 5555 ;
select "after RESIGNAL";
end;
-insert into t_warn set a= 9999999999999999;
+insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
before RESIGNAL
@@ -1913,7 +1915,7 @@ MESSAGE_TEXT = "RESIGNAL to a not found",
MYSQL_ERRNO = 5555 ;
select "after RESIGNAL";
end;
-insert into t_warn set a= 9999999999999999;
+insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
before RESIGNAL
@@ -1934,7 +1936,7 @@ MESSAGE_TEXT = "RESIGNAL to an error",
MYSQL_ERRNO = 5555 ;
select "after RESIGNAL";
end;
-insert into t_warn set a= 9999999999999999;
+insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
before RESIGNAL
diff --git a/mysql-test/r/skip_grants.result b/mysql-test/r/skip_grants.result
index b167a197e50..6c1a9331a44 100644
--- a/mysql-test/r/skip_grants.result
+++ b/mysql-test/r/skip_grants.result
@@ -39,11 +39,11 @@ View Create View character_set_client collation_connection
v3 CREATE ALGORITHM=UNDEFINED DEFINER=`a`@`%` SQL SECURITY DEFINER VIEW `v3` AS select `t1`.`c` AS `c` from `t1` latin1 latin1_swedish_ci
SHOW CREATE PROCEDURE p3;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` PROCEDURE `p3`()
+p3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` PROCEDURE `p3`()
SELECT 3 latin1 latin1_swedish_ci latin1_swedish_ci
SHOW CREATE FUNCTION f3;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` FUNCTION `f3`() RETURNS int(11)
+f3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a`@`%` FUNCTION `f3`() RETURNS int(11)
RETURN 3 latin1 latin1_swedish_ci latin1_swedish_ci
DROP TRIGGER t1_bi;
DROP TRIGGER ti_ai;
diff --git a/mysql-test/r/sp-destruct.result b/mysql-test/r/sp-destruct.result
index 0eddfa70dd1..9168dfc25de 100644
--- a/mysql-test/r/sp-destruct.result
+++ b/mysql-test/r/sp-destruct.result
@@ -12,7 +12,9 @@ create function bug14233_f() returns int
return 42;
create table t1 (id int);
create trigger t1_ai after insert on t1 for each row call bug14233();
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table mysql.proc drop type;
+SET sql_mode = DEFAULT;
call bug14233();
ERROR HY000: Column count of mysql.proc is wrong. Expected 20, found 19. The table is probably corrupted
create view v1 as select bug14233_f();
@@ -38,7 +40,7 @@ ERROR 42S02: Table 'mysql.proc' doesn't exist
flush table mysql.proc;
flush privileges;
delete from mysql.proc where name like 'bug14233%';
-insert into mysql.proc
+insert ignore into mysql.proc
(
db, name, type, specific_name, language, sql_data_access, is_deterministic,
security_type, param_list, returns, body, definer, created, modified,
@@ -70,6 +72,10 @@ values
'', '', '',
'alksj wpsj sa ^#!@ '
);
+Warnings:
+Warning 1265 Data truncated for column 'modified' at row 1
+Warning 1265 Data truncated for column 'modified' at row 2
+Warning 1265 Data truncated for column 'modified' at row 3
select bug14233_1();
ERROR HY000: Failed to load routine test.bug14233_1. The table mysql.proc is missing, corrupt, or contains bad data (internal code -6)
create view v1 as select bug14233_1();
@@ -97,7 +103,9 @@ DROP TABLE IF EXISTS proc_backup;
DROP PROCEDURE IF EXISTS p1;
# Backup the proc table
RENAME TABLE mysql.proc TO proc_backup;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE mysql.proc LIKE proc_backup;
+SET sql_mode = DEFAULT;
FLUSH TABLE mysql.proc;
# Test with a valid table.
CREATE PROCEDURE p1()
@@ -107,7 +115,9 @@ SHOW PROCEDURE STATUS;
Db Name Type Definer Modified Created Security_type Comment character_set_client collation_connection Database Collation
test p1 PROCEDURE root@localhost 0000-00-00 00:00:00 0000-00-00 00:00:00 DEFINER latin1 latin1_swedish_ci latin1_swedish_ci
# Modify a field of the table.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
+SET sql_mode = DEFAULT;
CREATE PROCEDURE p2()
SET @foo = 10;
ERROR HY000: Cannot load from mysql.proc. The table is probably corrupted
@@ -142,7 +152,9 @@ drop database if exists mysqltest;
flush table mysql.proc;
create database mysqltest;
# Corrupt mysql.proc to make it unusable by current version of server.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table mysql.proc drop column type;
+SET sql_mode = DEFAULT;
# The below statement should not cause assertion failure.
drop database mysqltest;
Warnings:
@@ -156,11 +168,15 @@ DROP TABLE IF EXISTS proc_backup;
DROP DATABASE IF EXISTS db1;
# Backup the proc table
RENAME TABLE mysql.proc TO proc_backup;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE mysql.proc LIKE proc_backup;
+SET sql_mode = DEFAULT;
CREATE DATABASE db1;
CREATE PROCEDURE db1.p1() SET @foo = 10;
# Modify a field of the table.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
+SET sql_mode = DEFAULT;
DROP DATABASE db1;
Warnings:
Error 1728 Cannot load from mysql.proc. The table is probably corrupted
diff --git a/mysql-test/r/sp-dynamic.result b/mysql-test/r/sp-dynamic.result
index 7309ba4c765..9fa3bea1108 100644
--- a/mysql-test/r/sp-dynamic.result
+++ b/mysql-test/r/sp-dynamic.result
@@ -220,6 +220,7 @@ id name
call p1()|
ERROR HY000: Unknown prepared statement handler (stmt) given to EXECUTE
drop procedure p1|
+set sql_mode= ''|
create procedure p1()
begin
declare a char(10);
@@ -232,6 +233,7 @@ call p1()|
ERROR 42S22: Unknown column 'a' in 'field list'
call p1()|
ERROR 42S22: Unknown column 'a' in 'field list'
+set sql_mode= DEFAULT|
drop procedure p1|
create procedure p1()
begin
diff --git a/mysql-test/r/sp-error.result b/mysql-test/r/sp-error.result
index 9b7d84dfdc4..6fbe2d62fd7 100644
--- a/mysql-test/r/sp-error.result
+++ b/mysql-test/r/sp-error.result
@@ -1879,6 +1879,7 @@ DROP PROCEDURE p1;
#
# Bug#5889: Exit handler for a warning doesn't hide the warning in trigger
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (1, 2);
CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
@@ -1895,6 +1896,7 @@ a b
10 20
DROP TRIGGER t1_bu;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Bug#9857: Stored procedures: handler for sqlwarning ignored
#
@@ -1940,11 +1942,11 @@ CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT);
CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT,
d SMALLINT, e SMALLINT, f SMALLINT);
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
-INSERT INTO t2(a, b, c) VALUES(99999, 99999, 99999);
+INSERT IGNORE INTO t2(a, b, c) VALUES(99999, 99999, 99999);
CREATE TRIGGER t1_ai AFTER INSERT ON t1 FOR EACH ROW
-INSERT INTO t2(d, e, f) VALUES(99999, 99999, 99999);
+INSERT IGNORE INTO t2(d, e, f) VALUES(99999, 99999, 99999);
CREATE PROCEDURE p1()
-INSERT INTO t1 VALUES(99999, 99999, 99999);
+INSERT IGNORE INTO t1 VALUES(99999, 99999, 99999);
CALL p1();
Warnings:
@@ -1962,6 +1964,7 @@ DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
# ----------------------------------------------------------------------
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1(x SMALLINT, y SMALLINT, z SMALLINT);
CREATE TABLE t2(a SMALLINT, b SMALLINT, c SMALLINT NOT NULL);
CREATE TRIGGER t1_bi BEFORE INSERT ON t1 FOR EACH ROW
@@ -1991,6 +1994,7 @@ Error 1048 Column 'c' cannot be null
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
+SET sql_mode = DEFAULT;
###################################################################
# Tests for the following bugs:
@@ -2614,7 +2618,7 @@ SELECT 'Warning caught' AS msg;
# The INSERT below raises 3 SQL-conditions (warnings). The EXIT HANDLER
# above must be invoked once (for one condition), but all three conditions
# must be cleared from the Diagnostics Area.
-INSERT INTO t1 VALUES('qqqq', 'ww', 'eee');
+INSERT IGNORE INTO t1 VALUES('qqqq', 'ww', 'eee');
# The following INSERT will not be executed, because of the EXIT HANDLER.
INSERT INTO t1 VALUES('zzz', 'xx', 'yyyy');
END|
@@ -2638,7 +2642,7 @@ SELECT 'Warning 1292 caught' AS msg;
# and 3 SQL-warnings with code 1264. The CONTINUE HANDLER above must be
# invoked once, and all nine SQL-warnings must be cleared from
# the Diagnostics Area.
-INSERT INTO t2
+INSERT IGNORE INTO t2
SELECT
CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
@@ -2708,7 +2712,7 @@ SIGNAL SQLSTATE '01000' SET MYSQL_ERRNO = 1234;
SHOW WARNINGS;
SELECT 'Handler for 1292 (2)' AS Msg;
END;
-INSERT INTO t2
+INSERT IGNORE INTO t2
SELECT
CAST(999999 AS SIGNED INTEGER),
CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
@@ -2735,7 +2739,7 @@ BEGIN
SHOW WARNINGS;
SELECT 'Handler for 1292' Msg;
END;
-INSERT INTO t2
+INSERT IGNORE INTO t2
SELECT
CAST(CONCAT(CAST('1 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
CAST(CONCAT(CAST('2 ' AS UNSIGNED INTEGER), '999999 ') AS SIGNED INTEGER),
@@ -2771,6 +2775,7 @@ DROP TABLE t2;
DROP PROCEDURE IF EXISTS p1;
DROP PROCEDURE IF EXISTS p2;
+SET sql_mode = '';
CREATE PROCEDURE p1()
BEGIN
DECLARE var1 INTEGER DEFAULT 'string';
@@ -2781,6 +2786,7 @@ CALL p1()|
Warnings:
Warning 1366 Incorrect integer value: 'string' for column 'var1' at row 1
+SET sql_mode = DEFAULT;
CREATE PROCEDURE p2()
BEGIN
DECLARE EXIT HANDLER FOR SQLWARNING SELECT 'H2';
diff --git a/mysql-test/r/sp-lock.result b/mysql-test/r/sp-lock.result
index 25982522163..507c2e683a0 100644
--- a/mysql-test/r/sp-lock.result
+++ b/mysql-test/r/sp-lock.result
@@ -735,7 +735,7 @@ connection con2;
get_lock("test", 10)
1
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
BEGIN
SELECT get_lock("test", 10);
SHOW CREATE PROCEDURE p1;
diff --git a/mysql-test/r/sp-security.result b/mysql-test/r/sp-security.result
index 22172bf18fc..d152bbeda45 100644
--- a/mysql-test/r/sp-security.result
+++ b/mysql-test/r/sp-security.result
@@ -442,19 +442,19 @@ connection con1root;
USE mysqltest;
SHOW CREATE PROCEDURE wl2897_p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-wl2897_p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` PROCEDURE `wl2897_p1`()
+wl2897_p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` PROCEDURE `wl2897_p1`()
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
SHOW CREATE PROCEDURE wl2897_p3;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-wl2897_p3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` PROCEDURE `wl2897_p3`()
+wl2897_p3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` PROCEDURE `wl2897_p3`()
SELECT 3 latin1 latin1_swedish_ci latin1_swedish_ci
SHOW CREATE FUNCTION wl2897_f1;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-wl2897_f1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` FUNCTION `wl2897_f1`() RETURNS int(11)
+wl2897_f1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`mysqltest_2`@`localhost` FUNCTION `wl2897_f1`() RETURNS int(11)
RETURN 1 latin1 latin1_swedish_ci latin1_swedish_ci
SHOW CREATE FUNCTION wl2897_f3;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-wl2897_f3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` FUNCTION `wl2897_f3`() RETURNS int(11)
+wl2897_f3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`a @ b @ c`@`localhost` FUNCTION `wl2897_f3`() RETURNS int(11)
RETURN 3 latin1 latin1_swedish_ci latin1_swedish_ci
DROP USER mysqltest_1@localhost;
DROP USER mysqltest_2@localhost;
@@ -520,7 +520,7 @@ SELECT a;
END //
SHOW CREATE PROCEDURE test.sp19857;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-sp19857 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`()
+sp19857 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`user19857`@`localhost` PROCEDURE `sp19857`()
DETERMINISTIC
BEGIN
DECLARE a INT;
@@ -704,7 +704,7 @@ connection con2;
# This should work
SHOW CREATE PROCEDURE db1.p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SELECT 1 latin1 latin1_swedish_ci latin1_swedish_ci
connection default;
disconnect con2;
diff --git a/mysql-test/r/sp-ucs2.result b/mysql-test/r/sp-ucs2.result
index 3c444ad97de..ec67bc3b6bd 100644
--- a/mysql-test/r/sp-ucs2.result
+++ b/mysql-test/r/sp-ucs2.result
@@ -40,7 +40,7 @@ BEGIN
RETURN '';
END|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
+f STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -55,7 +55,7 @@ BEGIN
RETURN '';
END|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
+f STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET ucs2 COLLATE ucs2_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -67,7 +67,7 @@ BEGIN
RETURN '';
END|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
+f STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -83,7 +83,7 @@ SET f2= f1;
SET f2= concat(collation(f1), ' ', collation(f2));
END|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-f NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
+f STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `f`() RETURNS varchar(64) CHARSET latin1 COLLATE latin1_bin
BEGIN
RETURN '';
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -127,7 +127,7 @@ RETURNS ENUM( 'w' ) CHARACTER SET ucs2
RETURN 0;
SHOW CREATE FUNCTION bug48766;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-bug48766 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('w') CHARSET ucs2
+bug48766 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('w') CHARSET ucs2
RETURN 0 utf8 utf8_general_ci latin1_swedish_ci
SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_NAME='bug48766';
@@ -139,7 +139,7 @@ RETURNS ENUM('а','б','в','г') CHARACTER SET ucs2
RETURN 0;
SHOW CREATE FUNCTION bug48766;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-bug48766 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('а','б','в','г') CHARSET ucs2
+bug48766 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `bug48766`() RETURNS enum('а','б','в','г') CHARSET ucs2
RETURN 0 utf8 utf8_general_ci latin1_swedish_ci
SELECT DTD_IDENTIFIER FROM INFORMATION_SCHEMA.ROUTINES
WHERE ROUTINE_NAME='bug48766';
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 02cca6b7284..9a36a67ddbc 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -791,7 +791,7 @@ comment 'Characteristics procedure test'
insert into t1 values ("chistics", 1)|
show create procedure chistics|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
+chistics STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
MODIFIES SQL DATA
COMMENT 'Characteristics procedure test'
insert into t1 values ("chistics", 1) latin1 latin1_swedish_ci latin1_swedish_ci
@@ -803,7 +803,7 @@ delete from t1|
alter procedure chistics sql security invoker|
show create procedure chistics|
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
+chistics STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `chistics`()
MODIFIES SQL DATA
SQL SECURITY INVOKER
COMMENT 'Characteristics procedure test'
@@ -818,7 +818,7 @@ comment 'Characteristics procedure test'
return 42|
show create function chistics|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
+chistics STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
DETERMINISTIC
SQL SECURITY INVOKER
COMMENT 'Characteristics procedure test'
@@ -831,7 +831,7 @@ no sql
comment 'Characteristics function test'|
show create function chistics|
Function sql_mode Create Function character_set_client collation_connection Database Collation
-chistics NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
+chistics STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `chistics`() RETURNS int(11)
NO SQL
DETERMINISTIC
SQL SECURITY INVOKER
diff --git a/mysql-test/r/sp_notembedded.result b/mysql-test/r/sp_notembedded.result
index 73cc4f154c7..c052fdb2ce1 100644
--- a/mysql-test/r/sp_notembedded.result
+++ b/mysql-test/r/sp_notembedded.result
@@ -56,6 +56,7 @@ return prm * bug10100f(prm - 1);
end if;
return 1;
end|
+set sql_mode = ''|
create procedure bug10100p(prm int, inout res int)
begin
set res = res * prm;
@@ -70,6 +71,7 @@ set res = 1;
call bug10100p(prm, res);
select res;
end|
+set sql_mode = default|
create table t3 (a int)|
insert into t3 values (0)|
create view v1 as select a from t3;
@@ -210,7 +212,7 @@ disconnect rl_contender;
drop procedure p1;
drop table t1;
set session low_priority_updates=default;
-INSERT INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
+INSERT IGNORE INTO mysql.user (Host, User, Password, Select_priv, Insert_priv, Update_priv,
Delete_priv, Create_priv, Drop_priv, Reload_priv, Shutdown_priv, Process_priv, File_priv,
Grant_priv, References_priv, Index_priv, Alter_priv, Show_db_priv, Super_priv,
Create_tmp_table_priv, Lock_tables_priv, Execute_priv, Repl_slave_priv, Repl_client_priv,
diff --git a/mysql-test/r/ssl.result b/mysql-test/r/ssl.result
index ac18da81b93..328cab00064 100644
--- a/mysql-test/r/ssl.result
+++ b/mysql-test/r/ssl.result
@@ -2102,6 +2102,7 @@ t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
ver_nr int(11) NOT NULL default '0',
@@ -2151,6 +2152,7 @@ KEY mcbs_aufnr(mcbs_aufnr),
KEY kundentyp(kundentyp),
KEY p_nr(p_nr,suffix)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
diff --git a/mysql-test/r/ssl_compress.result b/mysql-test/r/ssl_compress.result
index 4e37cc68a24..904f99a73ca 100644
--- a/mysql-test/r/ssl_compress.result
+++ b/mysql-test/r/ssl_compress.result
@@ -2099,6 +2099,7 @@ t2 0 PRIMARY 1 auto A 1199 NULL NULL BTREE
t2 0 fld1 1 fld1 A 1199 NULL NULL BTREE
t2 1 fld3 1 fld3 A NULL NULL NULL BTREE
drop table t4, t3, t2, t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
ver_nr int(11) NOT NULL default '0',
@@ -2148,6 +2149,7 @@ KEY mcbs_aufnr(mcbs_aufnr),
KEY kundentyp(kundentyp),
KEY p_nr(p_nr,suffix)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (3359356,405,3359356,'Mustermann Musterfrau',52500,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1485525,2122316,'+','','N',1909160,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',3,24,'MobilCom Shop Koeln',52500,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359357,468,3359357,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1503580,2139699,'+','','P',1909171,'MobilComSuper9D1T10SFreisprech(Akquise)',NULL,NULL,'MS9NS1',327,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
INSERT INTO t1 VALUES (3359358,407,3359358,'Mustermann Musterfrau',7001,'2000-05-20','workflow','Auftrag erledigt','Originalvertrag eingegangen und geprÃŒft','','privat',1501358,2137473,'N','','N',1909159,'MobilComSuper92000D2',NULL,NULL,'MS9ND2',325,24,'MobilCom Intern',7003,NULL,'auto',20010202105916,'Mobilfunk','PP','','','');
diff --git a/mysql-test/r/str_to_datetime_457.result b/mysql-test/r/str_to_datetime_457.result
index 4fd0d00691c..b3479dfef6a 100644
--- a/mysql-test/r/str_to_datetime_457.result
+++ b/mysql-test/r/str_to_datetime_457.result
@@ -12,9 +12,11 @@ Warning 1292 Truncated incorrect datetime value: '2012103123595912'
Warning 1292 Truncated incorrect datetime value: '20121031235959123'
select cast(0 as date), cast('0000-00-00' as date), cast('0' as date);
cast(0 as date) cast('0000-00-00' as date) cast('0' as date)
-0000-00-00 0000-00-00 NULL
+NULL NULL NULL
Warnings:
Warning 1292 Incorrect datetime value: '0'
+Warning 1292 Incorrect datetime value: '0000-00-00'
+Warning 1292 Incorrect datetime value: '0'
select extract(hour from '100000:02:03'), extract(hour from '100000:02:03 ');
extract(hour from '100000:02:03') extract(hour from '100000:02:03 ')
NULL NULL
@@ -39,13 +41,19 @@ Warnings:
Warning 1292 Truncated incorrect time value: '12:00:00-12.34.56'
select cast('12:00:00.12.34.56' as datetime);
cast('12:00:00.12.34.56' as datetime)
-2012-00-00 12:34:56
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '12:00:00.12.34.56'
select cast('12:00:00-12.34.56' as datetime);
cast('12:00:00-12.34.56' as datetime)
-2012-00-00 12:34:56
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '12:00:00-12.34.56'
select cast('12:00:00 12.34.56' as datetime);
cast('12:00:00 12.34.56' as datetime)
-2012-00-00 12:34:56
+NULL
+Warnings:
+Warning 1292 Incorrect datetime value: '12:00:00 12.34.56'
select cast('12:00:00.123456' as time);
cast('12:00:00.123456' as time)
12:00:00
diff --git a/mysql-test/r/strict.result b/mysql-test/r/strict.result
index 49a7c45de6e..f8476250831 100644
--- a/mysql-test/r/strict.result
+++ b/mysql-test/r/strict.result
@@ -1373,7 +1373,7 @@ i int comment
123456789*123456789*123456789*123456789*
123456789*123456789*123456789*123456789*');
ERROR HY000: Comment for field 'i' is too long (max = 1024)
-set @@sql_mode= @org_mode;
+set @@sql_mode= 'NO_ENGINE_SUBSTITUTION';
create table t1
(i int comment
'123456789*123456789*123456789*123456789*
@@ -1433,6 +1433,7 @@ i 123456789*123456789*123456789*123456789*
123456789*123456789*123456789*123456789*
123456789*123456789*123456789*12345
drop table t1;
+set @@sql_mode= @org_mode;
set names utf8;
create table t1 (i int)
comment '123456789*123456789*123456789*123456789*123456789*123456789*';
diff --git a/mysql-test/r/subselect.result b/mysql-test/r/subselect.result
index 5ed2f5c9622..4dc301fd316 100644
--- a/mysql-test/r/subselect.result
+++ b/mysql-test/r/subselect.result
@@ -354,7 +354,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -394,6 +396,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -401,6 +404,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -443,6 +447,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -450,6 +455,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1179,6 +1185,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1188,6 +1195,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1197,17 +1206,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1719,7 +1729,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3680,12 +3692,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4464,7 +4478,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect2.result b/mysql-test/r/subselect2.result
index e87f4b9b451..820a37634ba 100644
--- a/mysql-test/r/subselect2.result
+++ b/mysql-test/r/subselect2.result
@@ -16,9 +16,10 @@ DOCID VARCHAR(32)BINARY NOT NULL
, PRIMARY KEY ( DOCID )
) ENGINE=InnoDB
;
-INSERT INTO t1 (DOCID) VALUES ("1"), ("2");
+INSERT IGNORE INTO t1 (DOCID) VALUES ("1"), ("2");
Warnings:
Warning 1364 Field 'UUID' doesn't have a default value
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
DOCID VARCHAR(32)BINARY NOT NULL
@@ -63,6 +64,7 @@ FOLDERID VARCHAR(32)BINARY NOT NULL
) ENGINE=InnoDB;
CREATE INDEX FFOLDERID_IDX ON t3 (FOLDERID);
CREATE INDEX CMFLDRPARNT_IDX ON t3 (PARENTID);
+SET sql_mode = DEFAULT;
CREATE TABLE t4
(
DOCTYPEID VARCHAR(32)BINARY NOT NULL
@@ -114,12 +116,14 @@ INSERT INTO t4 VALUES("c373e9f59cf15a6116a5444553544200", "Special DocÃu20A4u20A
INSERT INTO t4 VALUES("c373e9f59cf15a695d47444553544200", "Movie", NULL, NULL, "2003-06-06 07:48:41", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f5ad079174ff17444553544200", "Discussion", NULL, NULL, "2003-06-09 10:51:25", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f5ad0791da7e2b444553544200", "Books", "list of recommended books", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<props autocheckin=\"false\" autopublish=\"false\" binary=\"choice\" categories=\"none\" cleanup=\"false\" folder=\"none\"><![CDATA[Doc type for cm tests]]><![CDATA[Doc type for book tests]]></props>\r\n", "2003-06-09 10:51:40", "admin", NULL);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_DCTYPES ( DOCTYPEID)
REFERENCES t4 (DOCTYPEID );
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_FLDRS ( FOLDERID)
REFERENCES t3 (FOLDERID );
ALTER TABLE t3 ADD FOREIGN KEY FK_FLDRS_PRNTID ( PARENTID)
REFERENCES t3 (FOLDERID );
+SET sql_mode = DEFAULT;
SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
DOCID DOCNAME DOCTYPEID FOLDERID AUTHOR CREATED TITLE SUBTITLE DOCABSTRACT PUBLISHDATE EXPIRATIONDATE LOCKEDBY STATUS PARENTDOCID REPID MODIFIED MODIFIER PUBLISHSTATUS ORIGINATOR DOCTYPENAME CONTENTSIZE MIMETYPE
c373e9f5ad07993f3859444553544200 Last Discussion c373e9f5ad079174ff17444553544200 c373e9f5ad0796c0eca4444553544200 Goldilocks 2003-06-09 11:21:06 Title: Last Discussion NULL Setting new abstract and keeping doc checked out 2003-06-09 10:51:26 2003-06-09 10:51:26 NULL NULL NULL 03eea05112b845949f3fd03278b5fe43 2003-06-09 11:21:06 admin 0 NULL Discussion NULL NULL
diff --git a/mysql-test/r/subselect4.result b/mysql-test/r/subselect4.result
index 792ce657ba0..058f0808832 100644
--- a/mysql-test/r/subselect4.result
+++ b/mysql-test/r/subselect4.result
@@ -2296,12 +2296,14 @@ d varchar(255) NOT NULL,
PRIMARY KEY (a, b), UNIQUE KEY idx(a, c)
);
INSERT INTO t1 VALUES ('r', 1, 'ad18832202b199728921807033a8a515', '001_cbr643');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
a enum('p','r') NOT NULL DEFAULT 'r',
b int NOT NULL DEFAULT '0',
e datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (a, b, e)
);
+SET sql_mode = DEFAULT;
INSERT INTO t2 VALUES ('r', 1, '2013-10-05 14:25:30');
SELECT * FROM t1 AS t
WHERE a='r' AND (c,b) NOT IN (SELECT c,b FROM t2 WHERE (c,b)=(t.c,t.b));
diff --git a/mysql-test/r/subselect_cache.result b/mysql-test/r/subselect_cache.result
index 86bc78dc204..bbc3af50ef3 100644
--- a/mysql-test/r/subselect_cache.result
+++ b/mysql-test/r/subselect_cache.result
@@ -1776,7 +1776,9 @@ a
03:03:03
DROP TABLE t1;
#timestamp
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( a timestamp, b timestamp);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES('2000-02-02 01:01:01','2000-02-02 01:01:01'),('2000-02-02 02:02:02','2000-02-02 02:02:02'),('2000-02-02 03:03:03','2000-02-02 03:03:03');
SELECT a FROM t1 WHERE NOT a IN (SELECT a FROM t1 WHERE b = '2000-02-02 02:02:02');
a
diff --git a/mysql-test/r/subselect_innodb.result b/mysql-test/r/subselect_innodb.result
index cfbe5d41418..a2bf056606f 100644
--- a/mysql-test/r/subselect_innodb.result
+++ b/mysql-test/r/subselect_innodb.result
@@ -1,6 +1,7 @@
set @subselect_innodb_tmp=@@optimizer_switch;
set optimizer_switch='mrr=on,mrr_sort_keys=on,index_condition_pushdown=on';
drop table if exists t1,t2,t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(
FOLDERID VARCHAR(32)BINARY NOT NULL
@@ -19,6 +20,7 @@ FOLDERID VARCHAR(32)BINARY NOT NULL
) ENGINE=InnoDB;
CREATE INDEX FFOLDERID_IDX ON t1 (FOLDERID);
CREATE INDEX CMFLDRPARNT_IDX ON t1 (PARENTID);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES("0c9aab05b15048c59bc35c8461507deb", "System", "System", "2003-06-05 16:30:00", "The system content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "9c9aab05b15048c59bc35c8461507deb", "1");
INSERT INTO t1 VALUES("2f6161e879db43c1a5b82c21ddc49089", "Default", "System", "2003-06-09 10:52:02", "The default content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "03eea05112b845949f3fd03278b5fe43", "1");
INSERT INTO t1 VALUES("c373e9f5ad0791724315444553544200", "AddDocumentTest", "admin", "2003-06-09 10:51:25", "Movie Reviews", "0", "2003-06-09 10:51:25", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
diff --git a/mysql-test/r/subselect_mat.result b/mysql-test/r/subselect_mat.result
index 0d40ca3d01f..59f9d3c1876 100644
--- a/mysql-test/r/subselect_mat.result
+++ b/mysql-test/r/subselect_mat.result
@@ -1665,7 +1665,7 @@ DROP TABLE t1,t2,t3,t4,t5;
# BUG#836532: Crash in Item_equal_fields_iterator::get_curr_field with semijoin+materialization
#
CREATE TABLE t2 (a int);
-INSERT INTO t2 VALUES ('a'),('a');
+INSERT IGNORE INTO t2 VALUES ('a'),('a');
Warnings:
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2
diff --git a/mysql-test/r/subselect_no_exists_to_in.result b/mysql-test/r/subselect_no_exists_to_in.result
index 113a2333b80..73ce4966f88 100644
--- a/mysql-test/r/subselect_no_exists_to_in.result
+++ b/mysql-test/r/subselect_no_exists_to_in.result
@@ -358,7 +358,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -398,6 +400,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -405,6 +408,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -447,6 +451,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -454,6 +459,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1183,6 +1189,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1192,6 +1199,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1201,17 +1210,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1723,7 +1733,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3683,12 +3695,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4466,7 +4480,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect_no_mat.result b/mysql-test/r/subselect_no_mat.result
index 7ee8821cd00..028d7fa0743 100644
--- a/mysql-test/r/subselect_no_mat.result
+++ b/mysql-test/r/subselect_no_mat.result
@@ -361,7 +361,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -401,6 +403,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -408,6 +411,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -450,6 +454,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -457,6 +462,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1186,6 +1192,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1195,6 +1202,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1204,17 +1213,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1726,7 +1736,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3683,12 +3695,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4466,7 +4480,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect_no_opts.result b/mysql-test/r/subselect_no_opts.result
index 59074b859ea..d2b890e8972 100644
--- a/mysql-test/r/subselect_no_opts.result
+++ b/mysql-test/r/subselect_no_opts.result
@@ -357,7 +357,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -397,6 +399,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -404,6 +407,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -446,6 +450,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -453,6 +458,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1182,6 +1188,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1191,6 +1198,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1200,17 +1209,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1722,7 +1732,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3679,12 +3691,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4462,7 +4476,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect_no_scache.result b/mysql-test/r/subselect_no_scache.result
index 6acd441f465..8330a66d82d 100644
--- a/mysql-test/r/subselect_no_scache.result
+++ b/mysql-test/r/subselect_no_scache.result
@@ -360,7 +360,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -400,6 +402,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -407,6 +410,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -449,6 +453,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -456,6 +461,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1185,6 +1191,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1194,6 +1201,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1203,17 +1212,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1725,7 +1735,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3686,12 +3698,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4470,7 +4484,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect_no_semijoin.result b/mysql-test/r/subselect_no_semijoin.result
index 0c5f9885218..464dcc8c7e6 100644
--- a/mysql-test/r/subselect_no_semijoin.result
+++ b/mysql-test/r/subselect_no_semijoin.result
@@ -357,7 +357,9 @@ CREATE TABLE t3 (a varchar(20),b char(1) NOT NULL default '0');
INSERT INTO t3 VALUES ('W','a'),('A','c'),('J','b');
CREATE TABLE t2 (a varchar(20),b int NOT NULL default '0');
INSERT INTO t2 VALUES ('W','1'),('A','3'),('J','2');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(20),b date NOT NULL default '0000-00-00');
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES ('W','1732-02-22'),('A','1735-10-30'),('J','1743-04-13');
SELECT * FROM t1 WHERE b = (SELECT MIN(b) FROM t1);
a b
@@ -397,6 +399,7 @@ joce
SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%joce%');
ERROR 21000: Subquery returns more than 1 row
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`topic` mediumint(8) unsigned NOT NULL default '0',
`date` date NOT NULL default '0000-00-00',
@@ -404,6 +407,7 @@ CREATE TABLE `t1` (
PRIMARY KEY (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (topic,date,pseudo) VALUES
('43506','2002-10-02','joce'),('40143','2002-08-03','joce');
EXPLAIN EXTENDED SELECT DISTINCT date FROM t1 WHERE date='2002-08-03';
@@ -446,6 +450,7 @@ PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM ROW_FORMAT=FIXED;
INSERT INTO t1 (numeropost,maxnumrep) VALUES (40143,1),(43506,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -453,6 +458,7 @@ CREATE TABLE `t2` (
`pseudo` varchar(35) NOT NULL default '',
PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`)
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
INSERT INTO t2 (mot,topic,date,pseudo) VALUES ('joce','40143','2002-10-22','joce'), ('joce','43506','2002-10-22','joce');
select numeropost as a FROM t1 GROUP BY (SELECT 1 FROM t1 HAVING a=1);
a
@@ -1182,6 +1188,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select (select benchmark(1,1) from `test`.`t1`) AS `(SELECT BENCHMARK(1,1) FROM t1)` from `test`.`t1`
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1191,6 +1198,8 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t2` (
`mot` varchar(30) character set latin1 NOT NULL default '',
`topic` mediumint(8) unsigned NOT NULL default '0',
@@ -1200,17 +1209,18 @@ PRIMARY KEY (`mot`,`pseudo`,`date`,`topic`),
KEY `pseudo` (`pseudo`,`date`,`topic`),
KEY `topic` (`topic`)
) ENGINE=MyISAM CHARSET=latin1 ROW_FORMAT=DYNAMIC;
+SET sql_mode = DEFAULT;
CREATE TABLE `t3` (
`numeropost` mediumint(8) unsigned NOT NULL auto_increment,
`maxnumrep` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`numeropost`),
UNIQUE KEY `maxnumrep` (`maxnumrep`)
) ENGINE=MyISAM CHARSET=latin1;
-INSERT INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t1 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
Warnings:
Warning 1265 Data truncated for column 'date' at row 1
Warning 1265 Data truncated for column 'date' at row 2
@@ -1722,7 +1732,9 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
Warnings:
Note 1003 select `test`.`t3`.`a` AS `a` from `test`.`t3` where <not>(<in_optimizer>(`test`.`t3`.`a`,<max>(select max(`test`.`t2`.`b`) from `test`.`t2` group by `test`.`t2`.`a`) >= <cache>(`test`.`t3`.`a`)))
drop table t2, t3;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` ( `id` mediumint(9) NOT NULL auto_increment, `taskid` bigint(20) NOT NULL default '0', `dbid` int(11) NOT NULL default '0', `create_date` datetime NOT NULL default '0000-00-00 00:00:00', `last_update` datetime NOT NULL default '0000-00-00 00:00:00', PRIMARY KEY (`id`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=3 ;
+SET sql_mode = DEFAULT;
INSERT INTO `t1` (`id`, `taskid`, `dbid`, `create_date`,`last_update`) VALUES (1, 1, 15, '2003-09-29 10:31:36', '2003-09-29 10:31:36'), (2, 1, 21, now(), now());
CREATE TABLE `t2` (`db_id` int(11) NOT NULL auto_increment,`name` varchar(200) NOT NULL default '',`primary_uid` smallint(6) NOT NULL default '0',`secondary_uid` smallint(6) NOT NULL default '0',PRIMARY KEY (`db_id`),UNIQUE KEY `name_2` (`name`),FULLTEXT KEY `name` (`name`)) ENGINE=MyISAM CHARSET=latin1 AUTO_INCREMENT=2147483647;
INSERT INTO `t2` (`db_id`, `name`, `primary_uid`, `secondary_uid`) VALUES (18, 'Not Set 1', 0, 0),(19, 'Valid', 1, 2),(20, 'Valid 2', 1, 2),(21, 'Should Not Return', 1, 2),(26, 'Not Set 2', 0, 0),(-1, 'ALL DB\'S', 0, 0);
@@ -3679,12 +3691,14 @@ id name date_last date_next_to_last
2 Joe 2006-04-20 2006-04-06
3 Frank 2006-04-13 NULL
DROP TABLE t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
i1 int(11) NOT NULL default '0',
i2 int(11) NOT NULL default '0',
t datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY (i1,i2,t)
);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
(24,1,'2005-03-03 16:31:31'),(24,1,'2005-05-27 12:40:07'),
(24,1,'2005-05-27 12:40:08'),(24,1,'2005-05-27 12:40:10'),
@@ -4462,7 +4476,7 @@ insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
create table t1(f11 int, f12 int);
create table t2(f21 int unsigned not null, f22 int, f23 varchar(10));
insert into t1 values(1,1),(2,2), (3, 3);
-insert into t2
+insert ignore into t2
select -1 , (@a:=(A.a + 10 * (B.a + 10 * (C.a+10*D.a))))/5000 + 1, @a
from t0 A, t0 B, t0 C, t0 D;
set session sort_buffer_size= 33*1024;
diff --git a/mysql-test/r/subselect_sj.result b/mysql-test/r/subselect_sj.result
index 91d05a31dfa..5f98360fb06 100644
--- a/mysql-test/r/subselect_sj.result
+++ b/mysql-test/r/subselect_sj.result
@@ -270,6 +270,27 @@ INSERT INTO t1 VALUES
(18,0,'00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','h','h'),
(19,0,'14:13:26','2008-11-09 05:53:48','2008-11-09 05:53:48','o','o'),
(20,0,'00:00:00','2009-10-11 06:58:04','2009-10-11 06:58:04','k','k');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 3
+Warning 1264 Out of range value for column 'datetime_nokey' at row 3
+Warning 1264 Out of range value for column 'datetime_key' at row 5
+Warning 1264 Out of range value for column 'datetime_nokey' at row 5
+Warning 1264 Out of range value for column 'datetime_key' at row 8
+Warning 1264 Out of range value for column 'datetime_nokey' at row 8
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_nokey' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 10
+Warning 1264 Out of range value for column 'datetime_nokey' at row 10
+Warning 1264 Out of range value for column 'datetime_key' at row 11
+Warning 1264 Out of range value for column 'datetime_nokey' at row 11
+Warning 1264 Out of range value for column 'datetime_key' at row 12
+Warning 1264 Out of range value for column 'datetime_nokey' at row 12
+Warning 1264 Out of range value for column 'datetime_key' at row 14
+Warning 1264 Out of range value for column 'datetime_nokey' at row 14
+Warning 1264 Out of range value for column 'datetime_key' at row 15
+Warning 1264 Out of range value for column 'datetime_nokey' at row 15
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_nokey' at row 18
CREATE TABLE t2 (
pk int(11) NOT NULL AUTO_INCREMENT,
int_nokey int(11) NOT NULL,
@@ -283,9 +304,14 @@ KEY time_key (time_key),
KEY datetime_key (datetime_key),
KEY varchar_key (varchar_key)
);
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
(10,0,'19:39:13','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),
(11,8,'03:43:53','0000-00-00 00:00:00','0000-00-00 00:00:00','b','b');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 1
+Warning 1264 Out of range value for column 'datetime_nokey' at row 1
+Warning 1264 Out of range value for column 'datetime_key' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 2
SELECT OUTR.datetime_nokey AS X FROM t1 AS OUTR
WHERE
OUTR.varchar_nokey IN (SELECT
@@ -688,6 +714,18 @@ INSERT INTO it2 VALUES
(7,'0000-00-00 00:00:00'), (0,'0000-00-00 00:00:00'),
(0,'2007-02-13 00:00:00'), (1,'0000-00-00 00:00:00'),
(0,'0000-00-00 00:00:00'), (1,'2003-08-11 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 2
+Warning 1264 Out of range value for column 'datetime_key' at row 4
+Warning 1264 Out of range value for column 'datetime_key' at row 5
+Warning 1264 Out of range value for column 'datetime_key' at row 6
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 14
+Warning 1264 Out of range value for column 'datetime_key' at row 15
+Warning 1264 Out of range value for column 'datetime_key' at row 16
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_key' at row 19
CREATE TABLE ot1 (
int_nokey int(11) NOT NULL,
int_key int(11) NOT NULL,
@@ -1175,8 +1213,19 @@ INSERT INTO t1 VALUES (10,7,5,'2009-06-16','2002-04-10 14:25:30','w'),
(15,6,5,'2001-11-12','0000-00-00 00:00:00',''),
(16,2,9,'0000-00-00','0000-00-00 00:00:00','j'),
(29,9,1,'0000-00-00','2003-08-11 00:00:00','m');
-INSERT INTO t3 VALUES (1,9,'0000-00-00','b','b'),
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 4
+Warning 1264 Out of range value for column 'datetime_nokey' at row 5
+Warning 1264 Out of range value for column 'datetime_nokey' at row 6
+Warning 1264 Out of range value for column 'date_key' at row 7
+Warning 1264 Out of range value for column 'datetime_nokey' at row 7
+Warning 1264 Out of range value for column 'date_key' at row 8
+INSERT IGNORE INTO t3 VALUES (1,9,'0000-00-00','b','b'),
(2,2,'2002-09-17','h','h');
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
SELECT t1.varchar_nokey FROM t1 JOIN t3 ON t1.datetime_nokey
WHERE t1.varchar_nokey
IN (SELECT varchar_nokey FROM t1
@@ -1201,7 +1250,7 @@ PRIMARY KEY (pk),
KEY datetime_key (datetime_key),
KEY varchar_key (varchar_key)
);
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
(1,9,'0000-00-00 00:00:00','p'),(2,0,'2002-02-09 07:38:13','v'),
(3,8,'2001-05-03 12:08:14','t'),(4,3,'0000-00-00 00:00:00','u'),
(5,7,'2009-07-28 03:43:30','n'),(6,0,'2009-08-04 00:00:00','l'),
@@ -1212,6 +1261,15 @@ INSERT INTO t1 VALUES
(15,8,'2008-11-02 00:00:00','n'),(16,5,'2006-03-15 00:00:00','b'),
(17,1,'0000-00-00 00:00:00','x'),(18,7,'0000-00-00 00:00:00',''),
(19,0,'2008-12-17 20:15:40','q'),(20,9,'0000-00-00 00:00:00','u');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 1
+Warning 1264 Out of range value for column 'datetime_key' at row 4
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 8
+Warning 1264 Out of range value for column 'datetime_key' at row 12
+Warning 1264 Out of range value for column 'datetime_key' at row 17
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_key' at row 20
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES
(10,0,'2006-07-07 07:26:28','q'),(11,5,'2002-09-23 00:00:00','m'),
@@ -1224,6 +1282,14 @@ INSERT INTO t2 VALUES
(24,0,'2009-04-27 00:00:00','w'),(25,4,'2006-10-20 14:52:15','x'),
(26,0,'0000-00-00 00:00:00','e'),(27,0,'2002-03-22 11:48:37','e'),
(28,2,'0000-00-00 00:00:00','p'),(29,0,'2001-01-04 03:55:07','x');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 3
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 10
+Warning 1264 Out of range value for column 'datetime_key' at row 13
+Warning 1264 Out of range value for column 'datetime_key' at row 17
+Warning 1264 Out of range value for column 'datetime_key' at row 19
CREATE TABLE t3 LIKE t1;
INSERT INTO t3 VALUES
(10,8,'2007-08-19 08:08:38','i'),(11,0,'2000-05-21 03:51:51','');
diff --git a/mysql-test/r/subselect_sj_jcl6.result b/mysql-test/r/subselect_sj_jcl6.result
index 09d88c9996f..f2d06d1f25a 100644
--- a/mysql-test/r/subselect_sj_jcl6.result
+++ b/mysql-test/r/subselect_sj_jcl6.result
@@ -283,6 +283,27 @@ INSERT INTO t1 VALUES
(18,0,'00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','h','h'),
(19,0,'14:13:26','2008-11-09 05:53:48','2008-11-09 05:53:48','o','o'),
(20,0,'00:00:00','2009-10-11 06:58:04','2009-10-11 06:58:04','k','k');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 3
+Warning 1264 Out of range value for column 'datetime_nokey' at row 3
+Warning 1264 Out of range value for column 'datetime_key' at row 5
+Warning 1264 Out of range value for column 'datetime_nokey' at row 5
+Warning 1264 Out of range value for column 'datetime_key' at row 8
+Warning 1264 Out of range value for column 'datetime_nokey' at row 8
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_nokey' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 10
+Warning 1264 Out of range value for column 'datetime_nokey' at row 10
+Warning 1264 Out of range value for column 'datetime_key' at row 11
+Warning 1264 Out of range value for column 'datetime_nokey' at row 11
+Warning 1264 Out of range value for column 'datetime_key' at row 12
+Warning 1264 Out of range value for column 'datetime_nokey' at row 12
+Warning 1264 Out of range value for column 'datetime_key' at row 14
+Warning 1264 Out of range value for column 'datetime_nokey' at row 14
+Warning 1264 Out of range value for column 'datetime_key' at row 15
+Warning 1264 Out of range value for column 'datetime_nokey' at row 15
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_nokey' at row 18
CREATE TABLE t2 (
pk int(11) NOT NULL AUTO_INCREMENT,
int_nokey int(11) NOT NULL,
@@ -296,9 +317,14 @@ KEY time_key (time_key),
KEY datetime_key (datetime_key),
KEY varchar_key (varchar_key)
);
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
(10,0,'19:39:13','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),
(11,8,'03:43:53','0000-00-00 00:00:00','0000-00-00 00:00:00','b','b');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 1
+Warning 1264 Out of range value for column 'datetime_nokey' at row 1
+Warning 1264 Out of range value for column 'datetime_key' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 2
SELECT OUTR.datetime_nokey AS X FROM t1 AS OUTR
WHERE
OUTR.varchar_nokey IN (SELECT
@@ -701,6 +727,18 @@ INSERT INTO it2 VALUES
(7,'0000-00-00 00:00:00'), (0,'0000-00-00 00:00:00'),
(0,'2007-02-13 00:00:00'), (1,'0000-00-00 00:00:00'),
(0,'0000-00-00 00:00:00'), (1,'2003-08-11 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 2
+Warning 1264 Out of range value for column 'datetime_key' at row 4
+Warning 1264 Out of range value for column 'datetime_key' at row 5
+Warning 1264 Out of range value for column 'datetime_key' at row 6
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 14
+Warning 1264 Out of range value for column 'datetime_key' at row 15
+Warning 1264 Out of range value for column 'datetime_key' at row 16
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_key' at row 19
CREATE TABLE ot1 (
int_nokey int(11) NOT NULL,
int_key int(11) NOT NULL,
@@ -1188,8 +1226,19 @@ INSERT INTO t1 VALUES (10,7,5,'2009-06-16','2002-04-10 14:25:30','w'),
(15,6,5,'2001-11-12','0000-00-00 00:00:00',''),
(16,2,9,'0000-00-00','0000-00-00 00:00:00','j'),
(29,9,1,'0000-00-00','2003-08-11 00:00:00','m');
-INSERT INTO t3 VALUES (1,9,'0000-00-00','b','b'),
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 4
+Warning 1264 Out of range value for column 'datetime_nokey' at row 5
+Warning 1264 Out of range value for column 'datetime_nokey' at row 6
+Warning 1264 Out of range value for column 'date_key' at row 7
+Warning 1264 Out of range value for column 'datetime_nokey' at row 7
+Warning 1264 Out of range value for column 'date_key' at row 8
+INSERT IGNORE INTO t3 VALUES (1,9,'0000-00-00','b','b'),
(2,2,'2002-09-17','h','h');
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
SELECT t1.varchar_nokey FROM t1 JOIN t3 ON t1.datetime_nokey
WHERE t1.varchar_nokey
IN (SELECT varchar_nokey FROM t1
@@ -1214,7 +1263,7 @@ PRIMARY KEY (pk),
KEY datetime_key (datetime_key),
KEY varchar_key (varchar_key)
);
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
(1,9,'0000-00-00 00:00:00','p'),(2,0,'2002-02-09 07:38:13','v'),
(3,8,'2001-05-03 12:08:14','t'),(4,3,'0000-00-00 00:00:00','u'),
(5,7,'2009-07-28 03:43:30','n'),(6,0,'2009-08-04 00:00:00','l'),
@@ -1225,6 +1274,15 @@ INSERT INTO t1 VALUES
(15,8,'2008-11-02 00:00:00','n'),(16,5,'2006-03-15 00:00:00','b'),
(17,1,'0000-00-00 00:00:00','x'),(18,7,'0000-00-00 00:00:00',''),
(19,0,'2008-12-17 20:15:40','q'),(20,9,'0000-00-00 00:00:00','u');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 1
+Warning 1264 Out of range value for column 'datetime_key' at row 4
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 8
+Warning 1264 Out of range value for column 'datetime_key' at row 12
+Warning 1264 Out of range value for column 'datetime_key' at row 17
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'datetime_key' at row 20
CREATE TABLE t2 LIKE t1;
INSERT INTO t2 VALUES
(10,0,'2006-07-07 07:26:28','q'),(11,5,'2002-09-23 00:00:00','m'),
@@ -1237,6 +1295,14 @@ INSERT INTO t2 VALUES
(24,0,'2009-04-27 00:00:00','w'),(25,4,'2006-10-20 14:52:15','x'),
(26,0,'0000-00-00 00:00:00','e'),(27,0,'2002-03-22 11:48:37','e'),
(28,2,'0000-00-00 00:00:00','p'),(29,0,'2001-01-04 03:55:07','x');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 3
+Warning 1264 Out of range value for column 'datetime_key' at row 7
+Warning 1264 Out of range value for column 'datetime_key' at row 9
+Warning 1264 Out of range value for column 'datetime_key' at row 10
+Warning 1264 Out of range value for column 'datetime_key' at row 13
+Warning 1264 Out of range value for column 'datetime_key' at row 17
+Warning 1264 Out of range value for column 'datetime_key' at row 19
CREATE TABLE t3 LIKE t1;
INSERT INTO t3 VALUES
(10,8,'2007-08-19 08:08:38','i'),(11,0,'2000-05-21 03:51:51','');
diff --git a/mysql-test/r/subselect_sj_mat.result b/mysql-test/r/subselect_sj_mat.result
index fa74cc36612..a3f3cc4213c 100644
--- a/mysql-test/r/subselect_sj_mat.result
+++ b/mysql-test/r/subselect_sj_mat.result
@@ -1702,7 +1702,7 @@ DROP TABLE t1,t2,t3,t4,t5;
# BUG#836532: Crash in Item_equal_fields_iterator::get_curr_field with semijoin+materialization
#
CREATE TABLE t2 (a int);
-INSERT INTO t2 VALUES ('a'),('a');
+INSERT IGNORE INTO t2 VALUES ('a'),('a');
Warnings:
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 1
Warning 1366 Incorrect integer value: 'a' for column 'a' at row 2
diff --git a/mysql-test/r/system_mysql_db_refs.result b/mysql-test/r/system_mysql_db_refs.result
index ac072505bc9..96ecd2f27c0 100644
--- a/mysql-test/r/system_mysql_db_refs.result
+++ b/mysql-test/r/system_mysql_db_refs.result
@@ -1,22 +1,22 @@
set @name="This is a very long string, that mustn't find room in a system field like Table_name. Thus it should be cut by the actual size of the field. So we can use this string to find out the actual length of the field and to use it in any compare queries";
create table test_db select * from mysql.db;
delete from test_db;
-insert into test_db (Host,Db,User) values (@name,@name,@name);
+insert ignore into test_db (Host,Db,User) values (@name,@name,@name);
create table test_host select * from mysql.host;
delete from test_host;
-insert into test_host (Host,Db) values (@name,@name);
+insert ignore into test_host (Host,Db) values (@name,@name);
create table test_user select * from mysql.user;
delete from test_user;
-insert into test_user (Host,User) values (@name,@name);
+insert ignore into test_user (Host,User) values (@name,@name);
create table test_func select * from mysql.func;
delete from test_func;
-insert into test_func (name) values (@name);
+insert ignore into test_func (name) values (@name);
create table test_tables_priv select * from mysql.tables_priv;
delete from test_tables_priv;
-insert into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name);
+insert ignore into test_tables_priv (Host,Db,User,Table_name) values (@name,@name,@name,@name);
create table test_columns_priv select * from mysql.columns_priv;
delete from test_columns_priv;
-insert into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name);
+insert ignore into test_columns_priv (Host,Db,User,Table_name,Column_name) values (@name,@name,@name,@name,@name);
select
if(isnull(test_db.Host),'WRONG!!!','ok') as test_db_Host,
if(isnull(test_host.Host),'WRONG!!!','ok') as test_host_Host,
diff --git a/mysql-test/r/temporal_literal.result b/mysql-test/r/temporal_literal.result
index f4f43fe9ba3..84a69d7789e 100644
--- a/mysql-test/r/temporal_literal.result
+++ b/mysql-test/r/temporal_literal.result
@@ -13,6 +13,7 @@ SELECT DATE'2001';
ERROR HY000: Incorrect DATE value: '2001'
SELECT DATE'2001-01';
ERROR HY000: Incorrect DATE value: '2001-01'
+SET sql_mode = '';
SELECT DATE'2001-00-00';
DATE'2001-00-00'
2001-00-00
@@ -22,6 +23,7 @@ DATE'2001-01-00'
SELECT DATE'0000-00-00';
DATE'0000-00-00'
0000-00-00
+SET sql_mode = DEFAULT;
SELECT DATE'2001-01-01 00:00:00';
ERROR HY000: Incorrect DATE value: '2001-01-01 00:00:00'
SELECT DATE'01:01:01';
@@ -278,6 +280,7 @@ id select_type table type possible_keys key key_len ref rows filtered Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL NULL No tables used
Warnings:
Note 1003 select TIMESTAMP'2010-01-01 10:10:10' AS `TIMESTAMP'2010-01-01 10:10:10'`
+SET sql_mode = '';
#
# Testing nanosecond rounding for TIMESTAMP literals with bad dates
#
@@ -356,6 +359,7 @@ a
2001-00-01 00:00:00
2001-01-00 00:00:00
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Testing Item_date_literal::eq
#
@@ -487,7 +491,7 @@ INSERT INTO t1 VALUES ('2001','toy',103);
INSERT INTO t1 VALUES ('2002','car',201);
INSERT INTO t1 VALUES ('2002','gas',202);
INSERT INTO t1 VALUES ('2002','toy',203);
-SET sql_mode=DEFAULT;
+SET sql_mode= '';
PREPARE stmt FROM "SELECT DATE'2001-00-00' AS c,year, SUM(profit) FROM t1 GROUP BY c,year WITH ROLLUP";
EXECUTE stmt;
c year SUM(profit)
@@ -523,7 +527,7 @@ DROP TABLE t1;
#
# MDEV-5971 Asymmetry between CAST(DATE'2001-00-00') to INT and TO CHAR in prepared statements
#
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS SIGNED) AS c";
SET sql_mode='no_zero_in_date';
EXECUTE stmt;
@@ -531,7 +535,7 @@ c
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2001-00-00'
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS CHAR) AS c";
SET sql_mode='no_zero_in_date';
EXECUTE stmt;
@@ -539,7 +543,7 @@ c
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2001-00-00'
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS DECIMAL(30,0)) AS c";
SET sql_mode='no_zero_in_date';
EXECUTE stmt;
@@ -547,7 +551,7 @@ c
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2001-00-00'
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT CAST(DATE'2001-00-00' AS DOUBLE) AS c";
SET sql_mode='no_zero_in_date';
EXECUTE stmt;
@@ -555,11 +559,12 @@ c
NULL
Warnings:
Warning 1292 Incorrect datetime value: '2001-00-00'
+SET sql_mode=DEFAULT;
#
# Zero month or zero day automatically mean NULL flag, no matter SQL_MODE is.
# Only zero year is OK for NOT NULL.
#
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "CREATE TABLE t1 AS SELECT CAST(DATE'2001-00-00' AS CHAR) AS c";
EXECUTE stmt;
SHOW COLUMNS FROM t1;
@@ -580,7 +585,7 @@ SELECT * FROM t1;
c
NULL
DROP TABLE t1;
-SET sql_mode=DEFAULT;
+SET sql_mode='';
CREATE TABLE t1 AS SELECT
DATE'2001-01-01',
DATE'0000-01-01',
@@ -613,10 +618,11 @@ t1 CREATE TABLE `t1` (
`TIMESTAMP'2001-01-00 00:00:00'` datetime DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# MDEV-5975 Prepared statements with DATE literals do not honor NO_ZERO_IN_DATE
#
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT (SELECT DATE'2001-00-00') AS c";
EXECUTE stmt;
c
@@ -628,7 +634,7 @@ NULL
Warnings:
Warning 1292 Incorrect datetime value: '2001-00-00'
DEALLOCATE PREPARE stmt;
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT (SELECT TIMESTAMP'2001-00-00 10:20:30') AS c";
EXECUTE stmt;
c
diff --git a/mysql-test/r/timezone2.result b/mysql-test/r/timezone2.result
index 096e996bffb..6367419a7d6 100644
--- a/mysql-test/r/timezone2.result
+++ b/mysql-test/r/timezone2.result
@@ -114,10 +114,11 @@ from_unixtime(362793609)
drop table t1;
create table t1 (ts timestamp);
set time_zone='UTC';
-insert into t1 values ('0000-00-00 00:00:00'),('1969-12-31 23:59:59'),
+insert ignore 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'),
('2038-01-19 03:14:07'),('2038-01-19 03:14:08');
Warnings:
+Warning 1265 Data truncated for column 'ts' at row 1
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
@@ -131,10 +132,11 @@ ts
0000-00-00 00:00:00
truncate table t1;
set time_zone='MET';
-insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 00:30:00'),
+insert ignore 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-19 04:14:07'),('2038-01-19 04:14:08');
Warnings:
+Warning 1265 Data truncated for column 'ts' at row 1
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
@@ -148,10 +150,11 @@ ts
0000-00-00 00:00:00
truncate table t1;
set time_zone='+01:30';
-insert into t1 values ('0000-00-00 00:00:00'),('1970-01-01 01:00:00'),
+insert ignore 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-19 04:44:07'),('2038-01-19 04:44:08');
Warnings:
+Warning 1265 Data truncated for column 'ts' at row 1
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
diff --git a/mysql-test/r/trigger-compat.result b/mysql-test/r/trigger-compat.result
index 6e22c46443f..cc6b2a13d4f 100644
--- a/mysql-test/r/trigger-compat.result
+++ b/mysql-test/r/trigger-compat.result
@@ -29,8 +29,8 @@ wl2818_trg2 mysqltest_dfn@localhost
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-def mysqltest_db1 wl2818_trg1 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
-def mysqltest_db1 wl2818_trg2 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_dfn@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 wl2818_trg1 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 wl2818_trg2 INSERT def mysqltest_db1 t1 1 NULL INSERT INTO t2 VALUES(CURRENT_USER()) ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_dfn@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DROP TRIGGER wl2818_trg1;
Warnings:
Warning 1454 No definer attribute for trigger 'mysqltest_db1'.'wl2818_trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger
diff --git a/mysql-test/r/trigger.result b/mysql-test/r/trigger.result
index 7c8cb5c46a6..8279e7a18b6 100644
--- a/mysql-test/r/trigger.result
+++ b/mysql-test/r/trigger.result
@@ -1316,6 +1316,7 @@ a b
2 b
3 c
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int NOT NULL DEFAULT '0',
a varchar(10) NOT NULL,
@@ -1348,6 +1349,7 @@ SELECT fubar_id FROM t2;
fubar_id
1
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
DROP TABLE IF EXISTS bug21825_A;
DROP TABLE IF EXISTS bug21825_B;
CREATE TABLE bug21825_A (id int(10));
@@ -2095,7 +2097,7 @@ DROP TABLE t1, t2;
CREATE TABLE t1 (id INT NOT NULL);
CREATE TABLE t2 (id INT NOT NULL);
INSERT t1 VALUES (1),(2),(3);
-UPDATE t1 SET id=NULL;
+UPDATE IGNORE t1 SET id=NULL;
Warnings:
Warning 1048 Column 'id' cannot be null
Warning 1048 Column 'id' cannot be null
@@ -2123,7 +2125,7 @@ CREATE TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERT/*!INTO*/t1 VALUES (1
# Used to crash
SHOW TRIGGERS IN db1;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1 INSERT t2 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERTINTOt1 VALUES (1) BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
+trg1 INSERT t2 CREATE DEFINER=`root`@`localhost` TRIGGER trg1 BEFORE INSERT ON t2 FOR EACH ROW INSERTINTOt1 VALUES (1) BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
INSERT INTO t2 VALUES (1);
ERROR 42000: Trigger 'trg1' has an error in its body: 'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'VALUES (1)' at line 1'
SELECT * FROM t1;
@@ -2178,6 +2180,7 @@ s1
DELETE FROM t1;
DROP TABLE t1;
DROP TEMPORARY TABLE t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
DROP TRIGGER IF EXISTS trg1;
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a INT);
@@ -2205,6 +2208,7 @@ BEGIN
DECLARE trg2 CHAR;
SELECT 'ab' INTO trg2;
END|
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;
a
diff --git a/mysql-test/r/trigger_notembedded.result b/mysql-test/r/trigger_notembedded.result
index 36352623998..733ca08d89f 100644
--- a/mysql-test/r/trigger_notembedded.result
+++ b/mysql-test/r/trigger_notembedded.result
@@ -133,8 +133,8 @@ INSERT INTO t1 VALUES(6);
ERROR HY000: The user specified as a definer ('mysqltest_nonexs'@'localhost') does not exist
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1 INSERT t1 SET @new_sum = 0 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-trg2 INSERT t1 SET @new_sum = 0 AFTER # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_nonexs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1 INSERT t1 SET @new_sum = 0 BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_inv@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg2 INSERT t1 SET @new_sum = 0 AFTER # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION mysqltest_nonexs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DROP TRIGGER trg1;
DROP TRIGGER trg2;
CREATE TRIGGER trg1 BEFORE INSERT ON t1
@@ -163,11 +163,11 @@ trg5 @abcdef@@@hostname
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS ORDER BY trigger_name;
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-def mysqltest_db1 trg1 INSERT def mysqltest_db1 t1 1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
-def mysqltest_db1 trg2 INSERT def mysqltest_db1 t1 1 NULL SET @a = 2 ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @ latin1 latin1_swedish_ci latin1_swedish_ci
-def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abc@def@@% latin1 latin1_swedish_ci latin1_swedish_ci
-def mysqltest_db1 trg4 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 4 ROW AFTER NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @hostname latin1 latin1_swedish_ci latin1_swedish_ci
-def mysqltest_db1 trg5 DELETE def mysqltest_db1 t1 1 NULL SET @a = 5 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abcdef@@@hostname latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 trg1 INSERT def mysqltest_db1 t1 1 NULL SET @a = 1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 trg2 INSERT def mysqltest_db1 t1 1 NULL SET @a = 2 ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @ latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 trg3 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 3 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abc@def@@% latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 trg4 UPDATE def mysqltest_db1 t1 1 NULL SET @a = 4 ROW AFTER NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @hostname latin1 latin1_swedish_ci latin1_swedish_ci
+def mysqltest_db1 trg5 DELETE def mysqltest_db1 t1 1 NULL SET @a = 5 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION @abcdef@@@hostname latin1 latin1_swedish_ci latin1_swedish_ci
connection default;
DROP USER mysqltest_dfn@localhost;
DROP USER mysqltest_inv@localhost;
diff --git a/mysql-test/r/trigger_wl3253.result b/mysql-test/r/trigger_wl3253.result
index c39591fdc17..c17b23b111d 100644
--- a/mysql-test/r/trigger_wl3253.result
+++ b/mysql-test/r/trigger_wl3253.result
@@ -93,13 +93,13 @@ CREATE TABLE t1 (a INT);
CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr1_bi INSERT t1 SET @a:=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1_bi INSERT t1 SET @a:=1 BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SHOW CREATE TRIGGER tr1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci #
+tr1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci #
DROP TABLE t1;
#
# Test 6.
@@ -142,7 +142,7 @@ SET TIMESTAMP=UNIX_TIMESTAMP('2013-01-31 09:00:01');
CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
SHOW CREATE TRIGGER tr1_bi;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr1_bi NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci 2013-01-31 09:00:01.00
+tr1_bi STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 latin1 latin1_swedish_ci latin1_swedish_ci 2013-01-31 09:00:01.00
DROP TABLE t1;
SET TIMESTAMP=DEFAULT;
#
@@ -155,10 +155,10 @@ SET TIMESTAMP=UNIX_TIMESTAMP('2013-01-31 09:00:01');
CREATE TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1;
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr1_bi INSERT t1 SET @a:=1 BEFORE 2013-01-31 09:00:01.00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1_bi INSERT t1 SET @a:=1 BEFORE 2013-01-31 09:00:01.00 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW 2013-01-31 09:00:01.00 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW 2013-01-31 09:00:01.00 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DROP TABLE t1;
SET TIMESTAMP=DEFAULT;
#
@@ -296,12 +296,12 @@ CREATE TRIGGER tr1_ai AFTER INSERT ON t1 FOR EACH ROW FOLLOWS tr1_bi SET @a:=3;
ERROR HY000: Referenced trigger 'tr1_bi' for the given action time and event type does not exist
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr1_bi INSERT t1 SET @a:=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-tr1_bu UPDATE t1 SET @a:=3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1_bi INSERT t1 SET @a:=1 BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1_bu UPDATE t1 SET @a:=3 BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE trigger_schema = 'test';
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
-def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-def test tr1_bu UPDATE def test t1 1 NULL SET @a:=3 ROW BEFORE NULL NULL OLD NEW # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def test tr1_bi INSERT def test t1 1 NULL SET @a:=1 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+def test tr1_bu UPDATE def test t1 1 NULL SET @a:=3 ROW BEFORE NULL NULL OLD NEW # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
DROP TABLE t1;
#
# Test 17. Check that table's triggers are dumped correctly.
@@ -323,7 +323,7 @@ CREATE TABLE `t1` (
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 */;;
DELIMITER ;
@@ -338,7 +338,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2 */;;
DELIMITER ;
@@ -353,7 +353,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bu BEFORE UPDATE ON t1 FOR EACH ROW SET @a:=3 */;;
DELIMITER ;
@@ -385,7 +385,7 @@ CREATE TABLE `t1` (
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr0_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=0 */;;
DELIMITER ;
@@ -400,7 +400,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1 */;;
DELIMITER ;
@@ -415,7 +415,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr1_1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=0 */;;
DELIMITER ;
@@ -430,7 +430,7 @@ DELIMITER ;
/*!50003 SET character_set_results = latin1 */ ;
/*!50003 SET collation_connection = latin1_swedish_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
-/*!50003 SET sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
+/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2 */;;
DELIMITER ;
@@ -454,17 +454,17 @@ SET TIMESTAMP=DEFAULT;
<table_data name="t1">
</table_data>
<triggers name="t1">
- <trigger Trigger="tr1_bi" sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
+ <trigger Trigger="tr1_bi" sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
<![CDATA[
CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=1
]]>
</trigger>
- <trigger Trigger="tr2_bi" sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
+ <trigger Trigger="tr2_bi" sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
<![CDATA[
CREATE DEFINER=`root`@`localhost` TRIGGER tr2_bi BEFORE INSERT ON t1 FOR EACH ROW SET @a:=2
]]>
</trigger>
- <trigger Trigger="tr1_bu" sql_mode="NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
+ <trigger Trigger="tr1_bu" sql_mode="STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION" character_set_client="latin1" collation_connection="latin1_swedish_ci" Database_Collation="latin1_swedish_ci" Created="2013-01-31 09:00:00.00">
<![CDATA[
CREATE DEFINER=`root`@`localhost` TRIGGER tr1_bu BEFORE UPDATE ON t1 FOR EACH ROW SET @a:=3
]]>
diff --git a/mysql-test/r/truncate.result b/mysql-test/r/truncate.result
index 9b4cb4a36d9..0282e78061b 100644
--- a/mysql-test/r/truncate.result
+++ b/mysql-test/r/truncate.result
@@ -142,7 +142,7 @@ TRUNCATE p1;
ERROR 42S02: Table 'test.p1' doesn't exist
SHOW CREATE PROCEDURE p1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-p1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
+p1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `p1`()
SET @a = 5 latin1 latin1_swedish_ci latin1_swedish_ci
DROP PROCEDURE p1;
#
diff --git a/mysql-test/r/type_binary.result b/mysql-test/r/type_binary.result
index 9d44d718a02..7dfe44ab045 100644
--- a/mysql-test/r/type_binary.result
+++ b/mysql-test/r/type_binary.result
@@ -116,7 +116,7 @@ hex(cast(0x10 as binary(2)))
1000
create table t1 (b binary(2), vb varbinary(2));
insert into t1 values(0x4120, 0x4120);
-insert into t1 values(0x412020, 0x412020);
+insert ignore into t1 values(0x412020, 0x412020);
Warnings:
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'vb' at row 1
@@ -137,7 +137,7 @@ ERROR 22001: Data too long for column 'vb' at row 1
drop table t1;
set @@sql_mode= @old_sql_mode;
create table t1(f1 int, f2 binary(2) not null, f3 char(2) not null);
-insert into t1 set f1=1;
+insert ignore into t1 set f1=1;
Warnings:
Warning 1364 Field 'f2' doesn't have a default value
Warning 1364 Field 'f3' doesn't have a default value
diff --git a/mysql-test/r/type_bit.result b/mysql-test/r/type_bit.result
index 639a97be27b..b2067907391 100644
--- a/mysql-test/r/type_bit.result
+++ b/mysql-test/r/type_bit.result
@@ -461,7 +461,7 @@ h
a
drop table t1;
create table t1 (a bit(8)) engine=heap;
-insert into t1 values ('1111100000');
+insert ignore into t1 values ('1111100000');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select a+0 from t1;
@@ -605,7 +605,7 @@ NULL NULL
11111111 11111111
drop table bug15583;
create table t1(a bit(1), b smallint unsigned);
-insert into t1 (b, a) values ('2', '1');
+insert ignore into t1 (b, a) values ('2', '1');
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select hex(a), b from t1;
@@ -675,7 +675,7 @@ COUNT(DISTINCT b,c)
2
DROP TABLE t2;
CREATE TABLE t1(a BIT(13), KEY(a));
-INSERT INTO t1(a) VALUES
+INSERT IGNORE INTO t1(a) VALUES
(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
EXPLAIN SELECT 1 FROM t1 GROUP BY a;
id select_type table type possible_keys key key_len ref rows Extra
diff --git a/mysql-test/r/type_bit_innodb.result b/mysql-test/r/type_bit_innodb.result
index acb3c311cf5..9b186207f3f 100644
--- a/mysql-test/r/type_bit_innodb.result
+++ b/mysql-test/r/type_bit_innodb.result
@@ -60,7 +60,7 @@ AAAAAAAAAAAAAAAA
5555555555555555
drop table t1;
create table t1 (a bit) engine=innodb;
-insert into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
+insert ignore into t1 values (b'0'), (b'1'), (b'000'), (b'100'), (b'001');
Warnings:
Warning 1264 Out of range value for column 'a' at row 4
select hex(a) from t1;
@@ -74,7 +74,7 @@ alter table t1 add unique (a);
ERROR 23000: Duplicate entry '' for key 'a'
drop table t1;
create table t1 (a bit(2)) engine=innodb;
-insert into t1 values (b'00'), (b'01'), (b'10'), (b'100');
+insert ignore into t1 values (b'00'), (b'01'), (b'10'), (b'100');
Warnings:
Warning 1264 Out of range value for column 'a' at row 4
select a+0 from t1;
diff --git a/mysql-test/r/type_blob.result b/mysql-test/r/type_blob.result
index dae9094f463..2a84d8f6306 100644
--- a/mysql-test/r/type_blob.result
+++ b/mysql-test/r/type_blob.result
@@ -7,13 +7,17 @@ b text YES NULL
c tinyblob YES NULL
d mediumtext YES NULL
e longtext YES NULL
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000));
Warnings:
Note 1246 Converting column 'b' from VARBINARY to BLOB
Note 1246 Converting column 'c' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t4 (c varchar(65530) character set utf8 not null);
Warnings:
Note 1246 Converting column 'c' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
show columns from t2;
Field Type Null Key Default Extra
a char(255) YES NULL
@@ -36,9 +40,11 @@ CREATE TABLE t1 (a char(257) default "hello");
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
CREATE TABLE t2 (a char(256));
ERROR 42000: Column length too big for column 'a' (max = 255); use BLOB or TEXT instead
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(70000) default "hello");
Warnings:
Note 1246 Converting column 'a' from VARCHAR to TEXT
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -402,6 +408,7 @@ PRIMARY KEY (seq_0_id,seq_1_id)
INSERT INTO t2 VALUES (1,1);
INSERT INTO t2 VALUES (2,1);
INSERT INTO t2 VALUES (2,2);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t3 (
t3_id bigint(21) NOT NULL auto_increment,
_field_131 varchar(128),
@@ -421,8 +428,13 @@ KEY _field_142 (_field_142),
KEY _field_145 (_field_145),
KEY _field_148 (_field_148)
);
-INSERT INTO t3 VALUES (1,'test job 1',0,'0000-00-00 00:00:00',0,'1999-02-25 22:43:32','test\r\njob\r\n1',0,0,0);
-INSERT INTO t3 VALUES (2,'test job 2',0,'0000-00-00 00:00:00',0,'1999-02-26 21:08:04','',0,0,0);
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t3 VALUES (1,'test job 1',0,'0000-00-00 00:00:00',0,'1999-02-25 22:43:32','test\r\njob\r\n1',0,0,0);
+Warnings:
+Warning 1264 Out of range value for column '_field_135' at row 1
+INSERT IGNORE INTO t3 VALUES (2,'test job 2',0,'0000-00-00 00:00:00',0,'1999-02-26 21:08:04','',0,0,0);
+Warnings:
+Warning 1264 Out of range value for column '_field_135' at row 1
CREATE TABLE t4 (
seq_0_id bigint(21) DEFAULT '0' NOT NULL,
seq_1_id bigint(21) DEFAULT '0' NOT NULL,
@@ -472,9 +484,11 @@ select replace(t3._field_140, "\r","^M"),t3_id,min(t3._field_131), min(t3._field
replace(t3._field_140, "\r","^M") t3_id min(t3._field_131) min(t3._field_135) min(t3._field_139) min(t3._field_137) min(link_alias_142._field_165) min(link_alias_133._field_72) min(t3._field_145) min(link_alias_148._field_156) replace(min(t3._field_140), "\r","^M") t3_id
test^M
job^M
-1 1 test job 1 0000-00-00 00:00:00 1999-02-25 22:43:32 0 High admin 0 tomato test^M
+1 1 test job 1 NULL 1999-02-25 22:43:32 0 High admin 0 tomato test^M
job^M
1 1
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
drop table t1,t2,t3,t4,t5,t6,t7;
create table t1 (a blob);
insert into t1 values ("empty"),("");
diff --git a/mysql-test/r/type_date.result b/mysql-test/r/type_date.result
index b28cf54f53a..dc1fac4359e 100644
--- a/mysql-test/r/type_date.result
+++ b/mysql-test/r/type_date.result
@@ -26,6 +26,8 @@ INSERT INTO t1 VALUES(1);
SELECT * FROM t1 WHERE LAST_DAY('0000-00-00 00:00:00') IS NULL;
a
1
+Warnings:
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
DROP TABLE t1;
CREATE TABLE t1 ( datum DATE );
INSERT INTO t1 VALUES ( "2000-1-1" );
@@ -106,7 +108,7 @@ f2
19781126
DROP TABLE t1, t2, t3;
CREATE TABLE t1 (y YEAR);
-INSERT INTO t1 VALUES ('abc');
+INSERT IGNORE INTO t1 VALUES ('abc');
Warnings:
Warning 1366 Incorrect integer value: 'abc' for column 'y' at row 1
SELECT * FROM t1;
@@ -143,7 +145,7 @@ Warning 1292 Incorrect datetime value: '1311'
Warning 1292 Incorrect datetime value: '1311'
Warning 1292 Incorrect datetime value: '1311'
create table t1 (d date , dt datetime , ts timestamp);
-insert into t1 values (9912101,9912101,9912101);
+insert ignore into t1 values (9912101,9912101,9912101);
Warnings:
Warning 1265 Data truncated for column 'd' at row 1
Warning 1265 Data truncated for column 'dt' at row 1
@@ -161,8 +163,10 @@ INSERT INTO t1 VALUES (1);
INSERT INTO t1 VALUES (NULL);
SELECT str_to_date( '', a ) FROM t1;
str_to_date( '', a )
-0000-00-00 00:00:00.000000
NULL
+NULL
+Warnings:
+Warning 1411 Incorrect datetime value: '' for function str_to_date
DROP TABLE t1;
CREATE TABLE t1 (a DATE, b INT, PRIMARY KEY (a,b));
SET timestamp=UNIX_TIMESTAMP('2016-07-21 14:48:18');
@@ -198,8 +202,14 @@ DROP TABLE t1;
CREATE TABLE t1 (a DATE);
CREATE TABLE t2 (a DATE);
CREATE INDEX i ON t1 (a);
-INSERT INTO t1 VALUES ('0000-00-00'),('0000-00-00');
-INSERT INTO t2 VALUES ('0000-00-00'),('0000-00-00');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00'),('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
+INSERT IGNORE INTO t2 VALUES ('0000-00-00'),('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
+Warning 1264 Out of range value for column 'a' at row 2
SELECT * FROM t1 WHERE a = '0000-00-00';
a
0000-00-00
@@ -227,28 +237,26 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (a DATE);
CREATE TABLE t2 (a DATE);
CREATE INDEX i ON t1 (a);
-INSERT INTO t1 VALUES ('1000-00-00'),('1000-00-00');
-INSERT INTO t2 VALUES ('1000-00-00'),('1000-00-00');
+INSERT IGNORE INTO t1 VALUES ('1000-00-00'),('1000-00-00');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 2
+INSERT IGNORE INTO t2 VALUES ('1000-00-00'),('1000-00-00');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+Warning 1265 Data truncated for column 'a' at row 2
SELECT * FROM t1 WHERE a = '1000-00-00';
a
-1000-00-00
-1000-00-00
SELECT * FROM t2 WHERE a = '1000-00-00';
a
-1000-00-00
-1000-00-00
SET SQL_MODE=TRADITIONAL;
EXPLAIN SELECT * FROM t1 WHERE a = '1000-00-00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref i i 4 const 1 Using index
SELECT * FROM t1 WHERE a = '1000-00-00';
a
-1000-00-00
-1000-00-00
SELECT * FROM t2 WHERE a = '1000-00-00';
a
-1000-00-00
-1000-00-00
INSERT INTO t1 VALUES ('1000-00-00');
ERROR 22007: Incorrect date value: '1000-00-00' for column 'a' at row 1
SET SQL_MODE=DEFAULT;
@@ -261,9 +269,10 @@ DROP TABLE t1;
End of 5.0 tests
create table t1 (a date, primary key (a))engine=memory;
insert into t1 values ('0000-01-01'), ('0000-00-01'), ('0001-01-01');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 2
select * from t1 where a between '0000-00-01' and '0000-00-02';
a
-0000-00-01
drop table t1;
#
# Bug#50918: Date columns treated differently in Views than in Base
@@ -300,7 +309,7 @@ b = CONVERT((SELECT CONVERT(a, DATE) FROM t1 GROUP BY a), DATE)
DROP TABLE t1;
End of 5.1 tests
create table t1 (f1 date, key (f1));
-insert t1 values ('2010-10-10 15:foobar');
+insert ignore t1 values ('2010-10-10 15:foobar');
Warnings:
Warning 1265 Data truncated for column 'f1' at row 1
drop table t1;
@@ -311,7 +320,8 @@ SELECT CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5
CONVERT_TZ(GREATEST(DATE('2021-00-00'),DATE('2022-00-00')),'+00:00','+7:5')
NULL
Warnings:
-Warning 1292 Incorrect datetime value: '2022-00-00'
+Warning 1292 Incorrect datetime value: '2021-00-00'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
#
# MDEV-4804 Date comparing false result
#
@@ -492,7 +502,9 @@ DROP TABLE t1;
# MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode through a default value
#
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATE DEFAULT '0000-00-00');
+SET sql_mode = DEFAULT;
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00');
ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
@@ -502,16 +514,24 @@ INSERT INTO t1 VALUES (DEFAULT);
ERROR 22007: Incorrect default value '0000-00-00' for column 'a'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATE NOT NULL DEFAULT '0000-00-00', b DATE NOT NULL DEFAULT '0000-00-00');
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (a DATE NOT NULL DEFAULT '0000-00-00');
-INSERT INTO t2 VALUES ('0000-00-00');
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 VALUES ('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
SET sql_mode=TRADITIONAL;
INSERT INTO t1 (a) SELECT a FROM t2;
ERROR 22007: Incorrect default value '0000-00-00' for column 'b'
DROP TABLE t1, t2;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATE DEFAULT '0000-00-00', b DATE DEFAULT '0000-00-00');
INSERT INTO t1 VALUES (DEFAULT,DEFAULT);;
+SET sql_mode = DEFAULT;
SELECT a INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1;
DELETE FROM t1;
SET sql_mode=TRADITIONAL;
@@ -519,7 +539,9 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' INTO TABLE t1 (a);
ERROR 22007: Incorrect default value '0000-00-00' for column 'b'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATE DEFAULT '0000-00-00');;
+SET sql_mode = DEFAULT;
SET sql_mode='NO_ZERO_DATE';
ALTER TABLE t1 ADD b INT NOT NULL;
ERROR 42000: Invalid default value for 'a'
@@ -533,7 +555,9 @@ SET sql_mode=DEFAULT;
#
SET sql_mode=DEFAULT;
CREATE TABLE t1 (a DATE);;
-INSERT INTO t1 VALUES (0);
+INSERT IGNORE INTO t1 VALUES (0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
ERROR 22007: Incorrect date value: '0000-00-00' for column 'a' at row 1
diff --git a/mysql-test/r/type_datetime.result b/mysql-test/r/type_datetime.result
index 8588ad185ed..10e1f3b4556 100644
--- a/mysql-test/r/type_datetime.result
+++ b/mysql-test/r/type_datetime.result
@@ -1,6 +1,9 @@
drop table if exists t1;
create table t1 (t datetime);
insert into t1 values (101),(691231),(700101),(991231),(10000101),(99991231),(101000000),(691231000000),(700101000000),(991231235959),(10000101000000),(99991231235959),(20030100000000),(20030000000000);
+Warnings:
+Warning 1265 Data truncated for column 't' at row 13
+Warning 1265 Data truncated for column 't' at row 14
select * from t1;
t
2000-01-01 00:00:00
@@ -15,8 +18,8 @@ t
1999-12-31 23:59:59
1000-01-01 00:00:00
9999-12-31 23:59:59
-2003-01-00 00:00:00
-2003-00-00 00:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
delete from t1 where t > 0;
optimize table t1;
Table Op Msg_type Msg_text
@@ -26,6 +29,9 @@ Table Op Msg_type Msg_text
test.t1 check status OK
delete from t1;
insert into t1 values("000101"),("691231"),("700101"),("991231"),("00000101"),("00010101"),("99991231"),("00101000000"),("691231000000"),("700101000000"),("991231235959"),("10000101000000"),("99991231235959"),("20030100000000"),("20030000000000");
+Warnings:
+Warning 1265 Data truncated for column 't' at row 14
+Warning 1265 Data truncated for column 't' at row 15
insert into t1 values ("2003-003-03");
insert into t1 values ("20030102T131415"),("2001-01-01T01:01:01"), ("2001-1-1T1:01:01");
select * from t1;
@@ -43,14 +49,14 @@ t
1999-12-31 23:59:59
1000-01-01 00:00:00
9999-12-31 23:59:59
-2003-01-00 00:00:00
-2003-00-00 00:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
2003-03-03 00:00:00
2003-01-02 13:14:15
2001-01-01 01:01:01
2001-01-01 01:01:01
truncate table t1;
-insert into t1 values("2003-0303 12:13:14");
+insert ignore into t1 values("2003-0303 12:13:14");
Warnings:
Warning 1265 Data truncated for column 't' at row 1
select * from t1;
@@ -66,7 +72,9 @@ date_format(a,"%Y-%m-%d")=b right(a+0,6)=c+0 a=d+0
1 1 1
drop table t1;
CREATE TABLE t1 (a datetime not null);
-insert into t1 values (0);
+insert ignore into t1 values (0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
select * from t1 where a is null;
a
0000-00-00 00:00:00
@@ -84,6 +92,7 @@ select * from t1 ignore index (dt) where dt > 20021020;
id dt
4 2003-09-15 01:20:30
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`date` datetime NOT NULL default '0000-00-00 00:00:00',
`numfacture` int(6) unsigned NOT NULL default '0',
@@ -92,15 +101,19 @@ PRIMARY KEY (`numfacture`),
KEY `date` (`date`),
KEY `expedition` (`expedition`)
) ENGINE=MyISAM;
-INSERT INTO t1 (expedition) VALUES ('0001-00-00 00:00:00');
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t1 (expedition) VALUES ('0001-00-00 00:00:00');
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'date'
+Warning 1265 Data truncated for column 'expedition' at row 1
SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
date numfacture expedition
-0000-00-00 00:00:00 0 0001-00-00 00:00:00
-INSERT INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00');
+INSERT IGNORE INTO t1 (numfacture,expedition) VALUES ('1212','0001-00-00 00:00:00');
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'date'
+Warning 1265 Data truncated for column 'expedition' at row 1
SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
date numfacture expedition
-0000-00-00 00:00:00 0 0001-00-00 00:00:00
-0000-00-00 00:00:00 1212 0001-00-00 00:00:00
EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref expedition expedition 5 const 1
@@ -112,7 +125,7 @@ select * from t1 where a is null or b is null;
a b
drop table t1;
create table t1 (t datetime);
-insert into t1 values (20030102030460),(20030102036301),(20030102240401),
+insert ignore into t1 values (20030102030460),(20030102036301),(20030102240401),
(20030132030401),(20031302030401),(100001202030401);
Warnings:
Warning 1265 Data truncated for column 't' at row 1
@@ -130,7 +143,7 @@ t
0000-00-00 00:00:00
0000-00-00 00:00:00
delete from t1;
-insert into t1 values
+insert ignore 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:
@@ -149,9 +162,9 @@ t
0000-00-00 00:00:00
0000-00-00 00:00:00
delete from t1;
-insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer");
+insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer");
Warnings:
-Warning 1265 Data truncated for column 't' at row 1
+Warning 1264 Out of range value for column 't' at row 1
Warning 1265 Data truncated for column 't' at row 2
select * from t1 order by t;
t
@@ -159,12 +172,18 @@ t
2003-01-01 00:00:00
drop table t1;
create table t1 (dt datetime);
-insert into t1 values ("12-00-00"), ("00-00-00 01:00:00");
-insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
+insert ignore into t1 values ("12-00-00"), ("00-00-00 01:00:00");
+Warnings:
+Warning 1265 Data truncated for column 'dt' at row 1
+Warning 1265 Data truncated for column 'dt' at row 2
+insert ignore into t1 values ("00-00-00"), ("00-00-00 00:00:00");
+Warnings:
+Warning 1264 Out of range value for column 'dt' at row 1
+Warning 1264 Out of range value for column 'dt' at row 2
select * from t1;
dt
-2012-00-00 00:00:00
-2000-00-00 01:00:00
+0000-00-00 00:00:00
+0000-00-00 00:00:00
0000-00-00 00:00:00
0000-00-00 00:00:00
drop table t1;
@@ -573,20 +592,28 @@ CAST('NULL' AS DATE) < CAST('2008-01-01' AS DATE) n7,
CAST('2008-01-01' AS DATE) < CAST('NULL' AS DATE) n8,
CAST('NULL' AS DATE) < CAST('NULL' AS DATE) n9;
n1 n2 n3 n4 n5 n6 n7 n8 n9
-0 0 1 1 1 0 1 0 0
+0 0 1 NULL NULL NULL NULL NULL NULL
Warnings:
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
-Warning 1292 Incorrect datetime value: 'NULL'
+Warning 1292 Truncated incorrect date value: '0000-00-00'
End of 5.0 tests
set @org_mode=@@sql_mode;
create table t1 (da date default '1962-03-03 23:33:34', dt datetime default '1962-03-03');
@@ -646,11 +673,14 @@ Note 1292 Truncated incorrect datetime value: '2008-07-29T10:42:51.1234567'
# Day is ZERO
#
CREATE TABLE t1 (dt1 DATETIME);
-INSERT INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+INSERT IGNORE INTO t1 (dt1) VALUES ('0000-00-01 00:00:01');
+Warnings:
+Warning 1265 Data truncated for column 'dt1' at row 1
DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
# Should be empty
SELECT * FROM t1;
dt1
+0000-00-00 00:00:00
DROP TABLE t1;
End of 5.1 tests
SET timestamp=UNIX_TIMESTAMP('2001-01-01 10:20:30');
@@ -667,7 +697,9 @@ SET timestamp=DEFAULT;
# when the field belongs to an inner table of an outer join
#
create table t1 (a int, b date not null);
-insert t1 values (1, 0), (2, '1999-01-02');
+insert ignore t1 values (1, 0), (2, '1999-01-02');
+Warnings:
+Warning 1264 Out of range value for column 'b' at row 1
create table t2 (c int);
insert t2 values (1),(3);
select * from t2 left join t1 on t1.a=t2.c where t1.a is null;
@@ -685,7 +717,9 @@ SELECT CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00
CONVERT_TZ(GREATEST(TIMESTAMP('2021-00-00'),TIMESTAMP('2022-00-00')),'+00:00','+7:5')
NULL
Warnings:
-Warning 1292 Incorrect datetime value: '2022-00-00 00:00:00'
+Warning 1292 Incorrect datetime value: '2021-00-00'
+Warning 1292 Incorrect datetime value: '2022-00-00'
+Warning 1292 Incorrect datetime value: '0000-00-00 00:00:00'
#
# MDEV-5041 Inserting a TIME with hour>24 into a DATETIME column produces a wrong value
#
@@ -792,9 +826,13 @@ DROP TABLE t1;
# RESULT CONSISTED OF MORE THAN ONE ROW
#
CREATE TABLE t1 (a DATE NOT NULL, b INT);
-INSERT INTO t1 VALUES ('0000-00-00',1), ('1999-05-10',2);
+INSERT IGNORE INTO t1 VALUES ('0000-00-00',1), ('1999-05-10',2);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
CREATE TABLE t2 (a DATETIME NOT NULL, b INT);
-INSERT INTO t2 VALUES ('0000-00-00 00:00:00',1), ('1999-05-10 00:00:00',2);
+INSERT IGNORE INTO t2 VALUES ('0000-00-00 00:00:00',1), ('1999-05-10 00:00:00',2);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
SELECT * FROM t1 WHERE a IS NULL;
a b
@@ -851,7 +889,9 @@ DROP TABLE t1;
# MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode through a default value
#
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
@@ -861,16 +901,24 @@ INSERT INTO t1 VALUES (DEFAULT);
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'a'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00', b DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (a DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00');
-INSERT INTO t2 VALUES ('0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 VALUES ('0000-00-00 00:00:00');
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
SET sql_mode=TRADITIONAL;
INSERT INTO t1 (a) SELECT a FROM t2;
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'b'
DROP TABLE t1, t2;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME DEFAULT '0000-00-00 00:00:00', b DATETIME DEFAULT '0000-00-00 00:00:00');
INSERT INTO t1 VALUES (DEFAULT,DEFAULT);;
+SET sql_mode = DEFAULT;
SELECT a INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1;
DELETE FROM t1;
SET sql_mode=TRADITIONAL;
@@ -878,7 +926,9 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' INTO TABLE t1 (a);
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'b'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME DEFAULT '0000-00-00 00:00:00');;
+SET sql_mode = DEFAULT;
SET sql_mode='NO_ZERO_DATE';
ALTER TABLE t1 ADD b INT NOT NULL;
ERROR 42000: Invalid default value for 'a'
@@ -892,7 +942,9 @@ SET sql_mode=DEFAULT;
#
SET sql_mode=DEFAULT;
CREATE TABLE t1 (a DATETIME);;
-INSERT INTO t1 VALUES (0);
+INSERT IGNORE INTO t1 VALUES (0);
+Warnings:
+Warning 1264 Out of range value for column 'a' at row 1
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
@@ -1155,43 +1207,55 @@ DROP TABLE t1;
# MDEV-9337 ALTER from DECIMAL and INT to DATETIME returns a wrong result
#
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (1000);
+INSERT IGNORE INTO t1 VALUES (1000);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
a
-2000-10-00 00:00:00
+0000-00-00 00:00:00
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME);
CREATE TABLE t2 (a INT);
INSERT INTO t2 VALUES (1000);
-INSERT INTO t1 SELECT * FROM t2;
+INSERT IGNORE INTO t1 SELECT * FROM t2;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
a
-2000-10-00 00:00:00
+0000-00-00 00:00:00
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT);
INSERT INTO t1 VALUES (1000);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a DATETIME;
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
a
2000-10-00 00:00:00
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (1000.0);
+INSERT IGNORE INTO t1 VALUES (1000.0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
a
-2000-10-00 00:00:00
+0000-00-00 00:00:00
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a DATETIME);
CREATE TABLE t2 (a DECIMAL(4,0));
INSERT INTO t2 VALUES (1000);
-INSERT INTO t1 SELECT * FROM t2;
+INSERT IGNORE INTO t1 SELECT * FROM t2;
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1;
a
-2000-10-00 00:00:00
+0000-00-00 00:00:00
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(4,0));
INSERT INTO t1 VALUES (1000);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a DATETIME;
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
a
2000-10-00 00:00:00
diff --git a/mysql-test/r/type_datetime_hires.result b/mysql-test/r/type_datetime_hires.result
index 5f10cdb3f39..a5acc93b930 100644
--- a/mysql-test/r/type_datetime_hires.result
+++ b/mysql-test/r/type_datetime_hires.result
@@ -7,7 +7,7 @@ insert t1 values ('2010-12-11 00:20:03.1234');
insert t1 values ('2010-12-11 15:47:11.1234');
insert t1 values (20101211010203.45678);
insert t1 values (20101211030405.789e0);
-insert t1 values (99991231235959e1);
+insert ignore t1 values (99991231235959e1);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -34,7 +34,9 @@ a DIV 1
select group_concat(distinct a) from t1;
group_concat(distinct a)
0000-00-00 00:00:00.000,2010-12-11 00:20:03.123,2010-12-11 01:02:03.456,2010-12-11 03:04:05.789,2010-12-11 15:47:11.123
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 engine=innodb;
+set sql_mode = default;
select * from t1 order by a;
a
0000-00-00 00:00:00.000
@@ -95,7 +97,7 @@ a
select a, a + interval 2 year from t1;
a a + interval 2 year
2010-12-11 01:02:13.3332 2012-12-11 01:02:13.3332
-insert t1 select a + interval 2 year from t1;
+insert ignore t1 select a + interval 2 year from t1;
select * from t1;
a
2010-12-11 01:02:13.3332
@@ -145,7 +147,9 @@ t3 CREATE TABLE `t3` (
`avg(a)` decimal(28,8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (f0_datetime datetime(0), f1_datetime datetime(1), f2_datetime datetime(2), f3_datetime datetime(3), f4_datetime datetime(4), f5_datetime datetime(5), f6_datetime datetime(6));
+set sql_mode = default;
insert t1 values ( '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432');
select * from t1;
f0_datetime 2010-11-12 11:14:17
@@ -196,7 +200,9 @@ double_f3_datetime 20101112111417.766
decimal5_f4_datetime 20101112111417.76540
bigint_f5_datetime 20101112111417
varchar_f6_datetime 2010-11-12 11:14:17.765432
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify time4_f0_datetime datetime(0), modify datetime3_f1_datetime datetime(1), modify date_f2_datetime datetime(2), modify double_f3_datetime datetime(3), modify decimal5_f4_datetime datetime(4), modify bigint_f5_datetime datetime(5), modify varchar_f6_datetime datetime(6);
+set sql_mode = default;
select * from t1;
time4_f0_datetime 2001-02-03 11:14:17
datetime3_f1_datetime 2010-11-12 11:14:17.7
@@ -216,7 +222,9 @@ decimal5_f4_datetime 2010-11-12 11:14:17.7654
bigint_f5_datetime 2010-11-12 11:14:17.00000
varchar_f6_datetime 2010-11-12 11:14:17.765432
drop table t1, t2;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime(6), b datetime(6));
+set sql_mode = default;
create procedure foo(x datetime, y datetime(4)) insert into t1 values (x, y);
call foo('2010-02-03 4:5:6.789123', '2010-02-03 4:5:6.789123');
select * from t1;
@@ -250,7 +258,9 @@ show columns from v1;
Field Type Null Key Default Extra
a datetime(6) YES NULL
b datetime(6) YES NULL
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from v1;
+set sql_mode = default;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -264,6 +274,7 @@ a b
drop view v1;
drop table t1, t2;
SET timestamp=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
taken datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00',
id int(11) NOT NULL DEFAULT '0',
@@ -275,6 +286,7 @@ PARTITION BY RANGE (to_days(taken))
PARTITION p01 VALUES LESS THAN (732920),
PARTITION p02 VALUES LESS THAN (732950),
PARTITION p03 VALUES LESS THAN MAXVALUE);
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES
('2006-09-27 21:50:01.123456',0),
('2006-09-27 21:50:01.123456',1),
@@ -298,6 +310,7 @@ id to_days(taken)
7 732950
8 732951
9 732951
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
taken datetime(5) NOT NULL DEFAULT '0000-00-00 00:00:00',
id int(11) NOT NULL DEFAULT '0',
@@ -309,6 +322,7 @@ PARTITION BY RANGE (extract(microsecond from taken))
PARTITION p01 VALUES LESS THAN (123000),
PARTITION p02 VALUES LESS THAN (500000),
PARTITION p03 VALUES LESS THAN MAXVALUE);
+SET sql_mode = DEFAULT;
INSERT INTO t2 VALUES
('2006-09-27 21:50:01',0),
('2006-09-27 21:50:01.1',1),
@@ -346,6 +360,8 @@ drop table t1;
SET @@time_zone='+00:00';
CREATE TABLE t1 (a DATETIME(4) NOT NULL);
INSERT INTO t1 VALUES ('2001-01-01 00:00:00'),('2000-00-00 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 2
SELECT UNIX_TIMESTAMP(a) FROM t1 ORDER BY 1;
UNIX_TIMESTAMP(a)
NULL
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index 0f72a244fd2..d3cac801f00 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -155,31 +155,31 @@ create table t1 (a decimal(10,2));
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
insert into t1 values ("-.1"),("+.1"),(".1");
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
-insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
-insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
Warnings:
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
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
-insert into t1 values ("1e+4294967296"),("1e-4294967296");
+insert ignore into t1 values ("1e+4294967296"),("1e-4294967296");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
-insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
+insert ignore into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1366 Incorrect decimal value: '1e+18446744073709551616' for column 'a' at row 2
Note 1265 Data truncated for column 'a' at row 3
Warning 1366 Incorrect decimal value: '1e-9223372036854775809' for column 'a' at row 4
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 3
@@ -222,28 +222,28 @@ create table t1 (a decimal(10,2) unsigned);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
Warnings:
Warning 1264 Out of range value for column 'a' at row 6
-insert into t1 values ("-.1"),("+.1"),(".1");
+insert ignore into t1 values ("-.1"),("+.1"),(".1");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
Warnings:
Warning 1264 Out of range value for column 'a' at row 3
-insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
Warnings:
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
-insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
Warnings:
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
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 3
@@ -280,28 +280,28 @@ create table t1 (a decimal(10,2) zerofill);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
Warnings:
Warning 1264 Out of range value for column 'a' at row 6
-insert into t1 values ("-.1"),("+.1"),(".1");
+insert ignore into t1 values ("-.1"),("+.1"),(".1");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
Warnings:
Warning 1264 Out of range value for column 'a' at row 3
-insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
Warnings:
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
-insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
Warnings:
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
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
Warning 1264 Out of range value for column 'a' at row 3
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 3
@@ -338,16 +338,16 @@ create table t1 (a decimal(10,2));
insert into t1 values (0.0),("-0.0"),(+0.0),(01.0),(+01.0),(-01.0);
insert into t1 values (-.1),(+.1),(.1);
insert into t1 values (00000000000001),(+0000000000001),(-0000000000001);
-insert into t1 values (+111111111.11),(111111111.11),(-11111111.11);
+insert ignore into t1 values (+111111111.11),(111111111.11),(-11111111.11);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
-insert into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
+insert ignore into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
Warnings:
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
-insert into t1 values (1e+100),(1e-100),(-1e+100);
+insert ignore into t1 values (1e+100),(1e-100),(-1e+100);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Note 1265 Data truncated for column 'a' at row 2
@@ -392,7 +392,7 @@ a
98760.00
drop table t1;
create table t1 (a decimal);
-insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
+insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+12345678901'),(99999999999999);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 6
@@ -408,7 +408,7 @@ a
9999999999
drop table t1;
create table t1 (a decimal unsigned);
-insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
@@ -424,7 +424,7 @@ a
9999999999
drop table t1;
create table t1 (a decimal zerofill);
-insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
@@ -440,7 +440,7 @@ a
9999999999
drop table t1;
create table t1 (a decimal unsigned zerofill);
-insert into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
+insert ignore into t1 values (-99999999999999),(-1),('+1'),('01'),('+00000000000001'),('+1234567890'),(99999999999999);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
@@ -456,14 +456,14 @@ a
9999999999
drop table t1;
create table t1(a decimal(10,0));
-insert into t1 values ("1e4294967295");
+insert ignore into t1 values ("1e4294967295");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
a
9999999999
delete from t1;
-insert into t1 values("1e4294967297");
+insert ignore into t1 values("1e4294967297");
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -781,9 +781,11 @@ select f1 from t1 where f1 in (select f1 from t1);
f1
40
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 as
select from_days(s) as date,t
from (select 1 as s,'t' as t union select null, null ) as sub1;
+SET sql_mode = DEFAULT;
select group_concat(t) from t1 group by week(date)/10;
group_concat(t)
t
diff --git a/mysql-test/r/type_enum.result b/mysql-test/r/type_enum.result
index db03e61fcdd..8a3d5f57249 100644
--- a/mysql-test/r/type_enum.result
+++ b/mysql-test/r/type_enum.result
@@ -1637,13 +1637,13 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a enum ('0','1'));
-insert into t1 set a='foobar';
+insert ignore into t1 set a='foobar';
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
a
-update t1 set a = replace(a,'x','y');
+update ignore t1 set a = replace(a,'x','y');
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -1778,6 +1778,7 @@ drop table t1;
create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
 !"','#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~','xx\','yy\€','zz‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ'));
ERROR 42000: Field separator argument is not what is expected; check the manual
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
c1 ENUM('a', '', 'b')
@@ -1801,6 +1802,7 @@ id c1 + 0 c1
3 2
4 0
DROP TABLE t1;
+SET sql_mode = DEFAULT;
End of 4.1 tests
create table t1(f1 set('a','b'), index(f1));
insert into t1 values(''),(''),('a'),('b');
@@ -1812,7 +1814,7 @@ drop table t1;
CREATE TABLE t1 (c1 ENUM('a', '', 'b'));
INSERT INTO t1 (c1) VALUES ('b');
INSERT INTO t1 (c1) VALUES ('');
-INSERT INTO t1 (c1) VALUES (0);
+INSERT IGNORE INTO t1 (c1) VALUES (0);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
INSERT INTO t1 (c1) VALUES ('');
@@ -2137,6 +2139,7 @@ DROP TABLE t1;
#
# MDEV-9340 Copying from INT/DOUBLE to ENUM is inconsistent
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a ENUM('9e200','9e100'));
CREATE TABLE t2 (a DOUBLE);
INSERT INTO t2 VALUES ('9e100');
@@ -2215,3 +2218,4 @@ SELECT * FROM t1;
a
DROP TABLE t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/r/type_float.result b/mysql-test/r/type_float.result
index 58dba89745d..8f5859a56a2 100644
--- a/mysql-test/r/type_float.result
+++ b/mysql-test/r/type_float.result
@@ -134,6 +134,7 @@ min(a)
drop table t1;
create table t1 (a float(200,100), b double(200,100));
ERROR 42000: Too big scale 100 specified for 'a'. Maximum is 30
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (c20 char);
insert into t1 values (5000.0);
Warnings:
@@ -142,12 +143,13 @@ insert into t1 values (0.5e4);
Warnings:
Warning 1265 Data truncated for column 'c20' at row 1
drop table t1;
+set sql_mode = DEFAULT;
create table t1 (f float(54));
ERROR 42000: Incorrect column specifier for column 'f'
drop table if exists t1;
create table t1 (d1 double, d2 double unsigned);
insert into t1 set d1 = -1.0;
-update t1 set d2 = d1;
+update ignore t1 set d2 = d1;
Warnings:
Warning 1264 Out of range value for column 'd2' at row 1
select * from t1;
@@ -155,7 +157,7 @@ d1 d2
-1 0
drop table t1;
create table t1 (f float(4,3));
-insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
Warnings:
Warning 1264 Out of range value for column 'f' at row 1
Warning 1264 Out of range value for column 'f' at row 2
@@ -173,7 +175,7 @@ f
9.999
drop table if exists t1;
create table t1 (f double(4,3));
-insert into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
+insert ignore into t1 values (-11.0),(-11),("-11"),(11.0),(11),("11");
Warnings:
Warning 1264 Out of range value for column 'f' at row 1
Warning 1264 Out of range value for column 'f' at row 2
@@ -363,7 +365,7 @@ DROP TABLE t1;
create table t1 (f1 double(200, 0));
insert into t1 values (1e199), (-1e199);
insert into t1 values (1e200), (-1e200);
-insert into t1 values (2e200), (-2e200);
+insert ignore into t1 values (2e200), (-2e200);
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 2
@@ -379,7 +381,7 @@ drop table t1;
create table t1 (f1 float(30, 0));
insert into t1 values (1e29), (-1e29);
insert into t1 values (1e30), (-1e30);
-insert into t1 values (2e30), (-2e30);
+insert ignore into t1 values (2e30), (-2e30);
Warnings:
Warning 1264 Out of range value for column 'f1' at row 1
Warning 1264 Out of range value for column 'f1' at row 2
@@ -453,10 +455,10 @@ foo
#
CREATE TABLE t1 (f FLOAT);
INSERT INTO t1 VALUES ('1.');
-INSERT INTO t1 VALUES ('2.0.');
+INSERT IGNORE INTO t1 VALUES ('2.0.');
Warnings:
Warning 1265 Data truncated for column 'f' at row 1
-INSERT INTO t1 VALUES ('.');
+INSERT IGNORE INTO t1 VALUES ('.');
Warnings:
Warning 1366 Incorrect double value: '.' for column 'f' at row 1
SELECT * FROM t1 ORDER BY f;
@@ -645,10 +647,10 @@ DROP TABLE t1;
# MDEV-4102 Limitation on DOUBLE or REAL length is ignored with INSERT .. SELECT
#
CREATE TABLE t1 (d1 DOUBLE(5,2), d2 DOUBLE(10,2));
-INSERT INTO t1 VALUES (10000000.55, 10000000.55);
+INSERT IGNORE INTO t1 VALUES (10000000.55, 10000000.55);
Warnings:
Warning 1264 Out of range value for column 'd1' at row 1
-INSERT INTO t1 SELECT d2, d2 FROM t1;
+INSERT IGNORE INTO t1 SELECT d2, d2 FROM t1;
Warnings:
Warning 1264 Out of range value for column 'd1' at row 1
SELECT * FROM t1;
@@ -664,7 +666,7 @@ f FLOAT,
d10_10 DOUBLE PRECISION (10,10),
d53_10 DOUBLE(53,10)
);
-INSERT INTO t1 (f,d10_10,d53_10) VALUES (
+INSERT IGNORE INTO t1 (f,d10_10,d53_10) VALUES (
-9999999999999999999999999999999999999999999.9999999999,
-9999999999999999999999999999999999999999999.9999999999,
-9999999999999999999999999999999999999999999.9999999999
@@ -676,7 +678,7 @@ SELECT * FROM t1;
f -3.40282e38
d10_10 -0.9999999999
d53_10 -10000000000000000000000000000000000000000000.0000000000
-INSERT INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1;
+INSERT IGNORE INTO t1 (f,d10_10,d53_10) SELECT d53_10, d53_10, d53_10 FROM t1;
Warnings:
Level Warning
Code 1264
@@ -705,7 +707,7 @@ DROP TABLE t1;
CREATE TABLE t1 (d10_10 DOUBLE (10,10));
CREATE TABLE t2 (d53_10 DOUBLE (53,10));
INSERT INTO t2 VALUES (-9999999999999999999999999999999999999999999.9999999999);
-INSERT INTO t1 (d10_10) SELECT d53_10 FROM t2;
+INSERT IGNORE INTO t1 (d10_10) SELECT d53_10 FROM t2;
Warnings:
Warning 1264 Out of range value for column 'd10_10' at row 1
SELECT * FROM t1;
@@ -715,7 +717,7 @@ DROP TABLE t1,t2;
CREATE TABLE t1 (d2_2 FLOAT (2,2));
CREATE TABLE t2 (d4_2 FLOAT (4,2));
INSERT INTO t2 VALUES (99.99);
-INSERT INTO t1 (d2_2) SELECT d4_2 FROM t2;
+INSERT IGNORE INTO t1 (d2_2) SELECT d4_2 FROM t2;
Warnings:
Warning 1264 Out of range value for column 'd2_2' at row 1
SELECT * FROM t1;
diff --git a/mysql-test/r/type_newdecimal.result b/mysql-test/r/type_newdecimal.result
index bc45d6d2789..313894b4b77 100644
--- a/mysql-test/r/type_newdecimal.result
+++ b/mysql-test/r/type_newdecimal.result
@@ -77,13 +77,13 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 (a decimal(4,2));
-insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
+insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1);
Warnings:
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);
+insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
@@ -101,13 +101,13 @@ a
-99.99
drop table t1;
create table t1 (a decimal(4,2) unsigned);
-insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
+insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1);
Warnings:
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);
+insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 2
@@ -125,13 +125,13 @@ a
0.00
drop table t1;
create table t1 (a bigint);
-insert into t1 values (18446744073709551615.0);
+insert ignore into t1 values (18446744073709551615.0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-insert into t1 values (9223372036854775808.0);
+insert ignore into t1 values (9223372036854775808.0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-insert into t1 values (-18446744073709551615.0);
+insert ignore into t1 values (-18446744073709551615.0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -143,10 +143,10 @@ drop table t1;
create table t1 (a bigint unsigned);
insert into t1 values (18446744073709551615.0);
insert into t1 values (9223372036854775808.0);
-insert into t1 values (9999999999999999999999999.000);
+insert ignore into t1 values (9999999999999999999999999.000);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
-insert into t1 values (-1.0);
+insert ignore into t1 values (-1.0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -157,11 +157,11 @@ a
0
drop table t1;
create table t1 (a tinyint);
-insert into t1 values (18446744073709551615.0);
+insert ignore into t1 values (18446744073709551615.0);
Warnings:
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);
+insert ignore into t1 values (9223372036854775808.0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1264 Out of range value for column 'a' at row 1
diff --git a/mysql-test/r/type_num.result b/mysql-test/r/type_num.result
index 9ee67ac8f33..9573852ce72 100644
--- a/mysql-test/r/type_num.result
+++ b/mysql-test/r/type_num.result
@@ -423,7 +423,7 @@ Note 1265 Data truncated for column 'i2' at row 1
Note 1265 Data truncated for column 'i4' at row 1
Note 1265 Data truncated for column 'i8' at row 1
Note 1265 Data truncated for column 'd' at row 1
-INSERT INTO t1 VALUES ('','','','','','','');
+INSERT IGNORE INTO t1 VALUES ('','','','','','','');
Warnings:
Warning 1366 Incorrect double value: '' for column 'f4' at row 1
Warning 1366 Incorrect double value: '' for column 'f8' at row 1
@@ -432,7 +432,7 @@ Warning 1366 Incorrect integer value: '' for column 'i2' at row 1
Warning 1366 Incorrect integer value: '' for column 'i4' at row 1
Warning 1366 Incorrect integer value: '' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: '' for column 'd' at row 1
-INSERT INTO t1 VALUES ('x','x','x','x','x','x','x');
+INSERT IGNORE INTO t1 VALUES ('x','x','x','x','x','x','x');
Warnings:
Warning 1366 Incorrect double value: 'x' for column 'f4' at row 1
Warning 1366 Incorrect double value: 'x' for column 'f8' at row 1
@@ -441,7 +441,7 @@ Warning 1366 Incorrect integer value: 'x' for column 'i2' at row 1
Warning 1366 Incorrect integer value: 'x' for column 'i4' at row 1
Warning 1366 Incorrect integer value: 'x' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: 'x' for column 'd' at row 1
-INSERT INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x');
+INSERT IGNORE INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x');
Warnings:
Warning 1366 Incorrect double value: ' x' for column 'f4' at row 1
Warning 1366 Incorrect double value: ' x' for column 'f8' at row 1
@@ -450,7 +450,7 @@ Warning 1366 Incorrect integer value: ' x' for column 'i2' at row 1
Warning 1366 Incorrect integer value: ' x' for column 'i4' at row 1
Warning 1366 Incorrect integer value: ' x' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: ' x' for column 'd' at row 1
-INSERT INTO t1 VALUES ('.','.','.','.','.','.','.');
+INSERT IGNORE INTO t1 VALUES ('.','.','.','.','.','.','.');
Warnings:
Warning 1366 Incorrect double value: '.' for column 'f4' at row 1
Warning 1366 Incorrect double value: '.' for column 'f8' at row 1
@@ -459,7 +459,7 @@ Warning 1366 Incorrect integer value: '.' for column 'i2' at row 1
Warning 1366 Incorrect integer value: '.' for column 'i4' at row 1
Warning 1366 Incorrect integer value: '.' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: '.' for column 'd' at row 1
-INSERT INTO t1 VALUES ('-','-','-','-','-','-','-');
+INSERT IGNORE INTO t1 VALUES ('-','-','-','-','-','-','-');
Warnings:
Warning 1366 Incorrect double value: '-' for column 'f4' at row 1
Warning 1366 Incorrect double value: '-' for column 'f8' at row 1
@@ -468,7 +468,7 @@ Warning 1366 Incorrect integer value: '-' for column 'i2' at row 1
Warning 1366 Incorrect integer value: '-' for column 'i4' at row 1
Warning 1366 Incorrect integer value: '-' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: '-' for column 'd' at row 1
-INSERT INTO t1 VALUES ('+','+','+','+','+','+','+');
+INSERT IGNORE INTO t1 VALUES ('+','+','+','+','+','+','+');
Warnings:
Warning 1366 Incorrect double value: '+' for column 'f4' at row 1
Warning 1366 Incorrect double value: '+' for column 'f8' at row 1
@@ -477,7 +477,7 @@ Warning 1366 Incorrect integer value: '+' for column 'i2' at row 1
Warning 1366 Incorrect integer value: '+' for column 'i4' at row 1
Warning 1366 Incorrect integer value: '+' for column 'i8' at row 1
Warning 1366 Incorrect decimal value: '+' for column 'd' at row 1
-INSERT INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x');
+INSERT IGNORE INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x');
Warnings:
Warning 1265 Data truncated for column 'f4' at row 1
Warning 1265 Data truncated for column 'f8' at row 1
@@ -486,7 +486,7 @@ Warning 1265 Data truncated for column 'i2' at row 1
Warning 1265 Data truncated for column 'i4' at row 1
Warning 1265 Data truncated for column 'i8' at row 1
Warning 1265 Data truncated for column 'd' at row 1
-INSERT INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e');
+INSERT IGNORE INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e');
Warnings:
Warning 1265 Data truncated for column 'f4' at row 1
Warning 1265 Data truncated for column 'f8' at row 1
@@ -495,7 +495,7 @@ Warning 1265 Data truncated for column 'i2' at row 1
Warning 1265 Data truncated for column 'i4' at row 1
Warning 1265 Data truncated for column 'i8' at row 1
Warning 1265 Data truncated for column 'd' at row 1
-INSERT INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-');
+INSERT IGNORE INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-');
Warnings:
Warning 1265 Data truncated for column 'f4' at row 1
Warning 1265 Data truncated for column 'f8' at row 1
@@ -504,7 +504,7 @@ Warning 1265 Data truncated for column 'i2' at row 1
Warning 1265 Data truncated for column 'i4' at row 1
Warning 1265 Data truncated for column 'i8' at row 1
Warning 1265 Data truncated for column 'd' at row 1
-INSERT INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+');
+INSERT IGNORE INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+');
Warnings:
Warning 1265 Data truncated for column 'f4' at row 1
Warning 1265 Data truncated for column 'f8' at row 1
@@ -513,7 +513,7 @@ Warning 1265 Data truncated for column 'i2' at row 1
Warning 1265 Data truncated for column 'i4' at row 1
Warning 1265 Data truncated for column 'i8' at row 1
Warning 1265 Data truncated for column 'd' at row 1
-INSERT INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000');
+INSERT IGNORE INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000');
Warnings:
Warning 1264 Out of range value for column 'f4' at row 1
Warning 1264 Out of range value for column 'f4' at row 1
diff --git a/mysql-test/r/type_ranges.result b/mysql-test/r/type_ranges.result
index a1416b13e1c..f1b791aa796 100644
--- a/mysql-test/r/type_ranges.result
+++ b/mysql-test/r/type_ranges.result
@@ -88,12 +88,15 @@ CREATE INDEX test3 on t1 ( medium ) ;
Warnings:
Note 1831 Duplicate index `test3`. This is deprecated and will be disallowed in a future release
DROP INDEX test ON t1;
-insert into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
+insert ignore into t1 values (10, 1,1,1,1,1,1,1,1,1,1,1,1,1,NULL,0,0,0,1,1,1,1,'one','one');
+Warnings:
+Warning 1264 Out of range value for column 'date_field' at row 1
+Warning 1264 Out of range value for column 'date_time' at row 1
insert into t1 values (NULL,2,2,2,2,2,2,2,2,2,2,2,2,2,NULL,NULL,NULL,NULL,NULL,NULL,2,2,'two','two,one');
-insert into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3);
+insert ignore into t1 values (0,1/3,3,3,3,3,3,3,3,3,3,3,3,3,NULL,'19970303','10:10:10','19970303101010','','','','3',3,3);
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);
+insert ignore 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 for column 'utiny' at row 1
Warning 1264 Out of range value for column 'ushort' at row 1
@@ -102,7 +105,7 @@ 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");
+insert ignore 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 for column 'tiny' at row 1
@@ -114,8 +117,10 @@ 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 1264 Out of range value for column 'date_field' at row 1
+Warning 1264 Out of range value for column 'date_time' 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);
+insert ignore 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 for column 'tiny' at row 1
Warning 1264 Out of range value for column 'short' at row 1
@@ -124,6 +129,8 @@ 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 'date_field' at row 1
+Warning 1264 Out of range value for column 'date_time' 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;
@@ -135,6 +142,7 @@ auto string tiny short medium long_int longlong real_float real_double utiny ush
14 -429496729 -128 -32768 -8388608 -2147483648 -4294967295 -4294967296.0 -4294967295.0000 0 00000 0 0 0 0 0000-00-00 00:00:00 0000-00-00 00:00:00 -4294967295 -4294967295 -4294967295 -4294967295
15 4294967295 127 32767 8388607 2147483647 4294967295 4294967296.0 4294967295.0000 255 65535 16777215 4294967295 4294967295 0 0000-00-00 00:00:00 0000-00-00 00:00:00 4294967295 4294967295 4294967295 4294967295
16 hello 1 1 0 0 0 0.0 NULL 0 00000 0 0 0 0 NULL NULL NULL NULL NULL
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1
add new_field char(10) default "new" not null,
change blob_col new_blob_col varchar(20),
@@ -146,10 +154,13 @@ DROP INDEX ushort,
DROP PRIMARY KEY,
DROP FOREIGN KEY any_name,
ADD INDEX (auto);
+SET sql_mode = DEFAULT;
LOCK TABLES t1 WRITE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1
RENAME as t2,
DROP longblob_col;
+SET sql_mode = DEFAULT;
UNLOCK TABLES;
ALTER TABLE t2 rename as t3;
LOCK TABLES t3 WRITE ;
@@ -171,7 +182,7 @@ mediumblob_col mediumblob not null,
new_field char(2),
PRIMARY KEY (auto)
);
-INSERT INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10;
+INSERT IGNORE INTO t2 (string,mediumblob_col,new_field) SELECT string,mediumblob_col,new_field from t1 where auto > 10;
Warnings:
Warning 1265 Data truncated for column 'new_field' at row 2
Warning 1265 Data truncated for column 'new_field' at row 3
@@ -208,7 +219,9 @@ select options,flags from t1 where options="one" and flags="one";
options flags
one one
drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from t1;
+SET sql_mode = DEFAULT;
update t2 set string="changed" where auto=16;
show full columns from t1;
Field Type Collation Null Key Default Extra Privileges Comment
@@ -275,12 +288,12 @@ Field Type Collation Null Key Default Extra Privileges Comment
auto int(11) unsigned NULL NO PRI NULL #
t1 int(1) NULL NO NULL #
t2 varchar(1) latin1_swedish_ci NO NULL #
-t3 varchar(256) latin1_swedish_ci NO NULL #
-t4 varbinary(256) NULL NO NULL #
-t5 text latin1_swedish_ci NO NULL #
-t6 blob NULL NO NULL #
+t3 varchar(256) latin1_swedish_ci YES NULL #
+t4 varbinary(256) NULL YES NULL #
+t5 text latin1_swedish_ci YES NULL #
+t6 blob NULL YES NULL #
t7 char(0) latin1_swedish_ci NO NULL #
-t8 binary(0) NULL NO NULL #
+t8 binary(0) NULL YES NULL #
select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
t1 t2 length(t3) length(t4) length(t5) length(t6) t7 t8
1 a 256 256 4096 4096
diff --git a/mysql-test/r/type_set.result b/mysql-test/r/type_set.result
index 9d3a6e3bcb4..cef37239997 100644
--- a/mysql-test/r/type_set.result
+++ b/mysql-test/r/type_set.result
@@ -72,6 +72,7 @@ set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17',
'34','35','36','37','38','39','40','41','42','43','44','45','46','47','48','49',
'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','128'));
ERROR HY000: Too many strings for column f1 and SET
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1(f1
set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17',
'18','19','20','21','22','23','24','25','26','27','28','29','30','31','32','33',
@@ -79,6 +80,7 @@ set('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17',
'50','51','52','53','54','55','56','57','58','59','60','61','62','63','64','1'));
Warnings:
Note 1291 Column 'f1' has duplicated value '1' in SET
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/r/type_temporal_innodb.result b/mysql-test/r/type_temporal_innodb.result
index 425e499a5d3..502d6a08075 100644
--- a/mysql-test/r/type_temporal_innodb.result
+++ b/mysql-test/r/type_temporal_innodb.result
@@ -7,7 +7,7 @@ TIME'00:00:00'=''
Warnings:
Warning 1292 Truncated incorrect time value: ''
CREATE TABLE t1 (a ENUM('a'), b TIME, c INT, KEY(b)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES ('','00:00:00',0);
+INSERT IGNORE INTO t1 VALUES ('','00:00:00',0);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
SELECT * FROM t1 WHERE b='';
@@ -52,15 +52,18 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
Warnings:
Warning 1292 Truncated incorrect time value: ''
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SELECT DATE'0000-00-00'='';
DATE'0000-00-00'=''
1
Warnings:
Warning 1292 Incorrect datetime value: ''
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a ENUM('a'), b DATE, c INT, KEY(b)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES ('','0000-00-00',0);
+INSERT IGNORE INTO t1 VALUES ('','0000-00-00',0);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
+Warning 1264 Out of range value for column 'b' at row 1
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
@@ -81,7 +84,9 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
Warnings:
Warning 1292 Incorrect datetime value: ''
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 0
@@ -103,15 +108,18 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
Warnings:
Warning 1292 Incorrect datetime value: ''
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SELECT TIMESTAMP'0000-00-00 00:00:00'='';
TIMESTAMP'0000-00-00 00:00:00'=''
1
Warnings:
Warning 1292 Incorrect datetime value: ''
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a ENUM('a'), b DATETIME, c INT, KEY(b)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES ('','0000-00-00 00:00:00',0);
+INSERT IGNORE INTO t1 VALUES ('','0000-00-00 00:00:00',0);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
+Warning 1264 Out of range value for column 'b' at row 1
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
@@ -132,7 +140,9 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
1
Warnings:
Warning 1292 Incorrect datetime value: ''
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE b='';
a b c
0000-00-00 00:00:00 0
diff --git a/mysql-test/r/type_time.result b/mysql-test/r/type_time.result
index ce1cb424a6c..1672f551510 100644
--- a/mysql-test/r/type_time.result
+++ b/mysql-test/r/type_time.result
@@ -25,6 +25,7 @@ t
12:30:00
12:30:35
36:30:31
+set sql_mode = '';
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
@@ -32,6 +33,7 @@ Warning 1265 Data truncated for column 't' at row 2
Warning 1265 Data truncated for column 't' at row 3
Warning 1265 Data truncated for column 't' at row 4
Warning 1265 Data truncated for column 't' at row 6
+set sql_mode = default;
select * from t1;
t
10:22:33
@@ -322,9 +324,11 @@ CREATE TABLE t1 (a TIME(6));
INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
ERROR 22007: Incorrect time value: '18446744069414584320' for column 'a' at row 1
SET sql_mode=DEFAULT;
+SET sql_mode='';
INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
+SET sql_mode= DEFAULT;
SELECT * FROM t1;
a
838:59:59.999999
@@ -787,6 +791,7 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = TIME'10:20:31.123000' and <cache>(length(TIME'10:20:31.123000')) = 30 + rand()
DROP TABLE t1;
SET timestamp=DEFAULT;
+SET @@sql_mode='';
SET @@old_mode=zero_date_time_cast;
# TIMESTAMP literal, old mode
CREATE TABLE t1 (a TIME);
@@ -881,6 +886,7 @@ Warnings:
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` = '0000-00-01 10:20:30' and length(`test`.`t1`.`a`) = 30 + rand()
DROP TABLE t1;
SET @@old_mode=DEFAULT;
+SET @@sql_mode=DEFAULT;
#
# MDEV-8706 Wrong result for SELECT..WHERE time_column=TIMESTAMP'2015-08-30 00:00:00' AND time_column='00:00:00'
#
@@ -1230,10 +1236,12 @@ INSERT INTO t1 (a,b,c) SELECT a,a,a FROM t2;
Warnings:
Warning 1265 Data truncated for column 'b' at row 2
Warning 1265 Data truncated for column 'b' at row 6
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY c TIME;
Warnings:
Warning 1265 Data truncated for column 'c' at row 2
Warning 1265 Data truncated for column 'c' at row 6
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
a b c
0000 00:00:00 00:00:00
diff --git a/mysql-test/r/type_time_hires.result b/mysql-test/r/type_time_hires.result
index b9f51e6a9b2..6a284765c2e 100644
--- a/mysql-test/r/type_time_hires.result
+++ b/mysql-test/r/type_time_hires.result
@@ -15,7 +15,7 @@ Note 1265 Data truncated for column 'a' at row 1
insert t1 values (20101211030405.789e0);
Warnings:
Note 1265 Data truncated for column 'a' at row 1
-insert t1 values (99991231235959e1);
+insert ignore t1 values (99991231235959e1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
select * from t1;
@@ -42,7 +42,9 @@ a DIV 1
select group_concat(distinct a) from t1;
group_concat(distinct a)
00:20:03.123,01:02:03.456,03:04:05.789,15:47:11.123,838:59:59.999
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 engine=innodb;
+set sql_mode = default;
select * from t1 order by a;
a
00:20:03.123
@@ -105,7 +107,7 @@ a a + interval 2 year
01:02:13.3332 NULL
Warnings:
Warning 1441 Datetime function: time field overflow
-insert t1 select a + interval 2 year from t1;
+insert ignore t1 select a + interval 2 year from t1;
Warnings:
Warning 1441 Datetime function: time field overflow
select * from t1;
@@ -159,7 +161,9 @@ t3 CREATE TABLE `t3` (
`avg(a)` decimal(19,8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (f0_time time(0), f1_time time(1), f2_time time(2), f3_time time(3), f4_time time(4), f5_time time(5), f6_time time(6));
+set sql_mode = default;
insert t1 values ( '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432');
Warnings:
Level Note
@@ -226,6 +230,7 @@ double_f3_time 111417.765
decimal5_f4_time 111417.76540
bigint_f5_time 111417
varchar_f6_time 11:14:17.765432
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify time4_f0_time time(0), modify datetime3_f1_time time(1), modify date_f2_time time(2), modify double_f3_time time(3), modify decimal5_f4_time time(4), modify bigint_f5_time time(5), modify varchar_f6_time time(6);
Warnings:
Level Note
@@ -234,6 +239,7 @@ Message Data truncated for column 'datetime3_f1_time' at row 1
Level Note
Code 1265
Message Data truncated for column 'date_f2_time' at row 1
+set sql_mode = default;
select * from t1;
time4_f0_time 11:14:17
datetime3_f1_time 11:14:17.7
@@ -260,7 +266,9 @@ decimal5_f4_time 11:14:17.7654
bigint_f5_time 11:14:17.00000
varchar_f6_time 11:14:17.765432
drop table t1, t2;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a time(6), b time(6));
+set sql_mode = default;
create procedure foo(x time, y time(4)) insert into t1 values (x, y);
call foo('2010-02-03 4:5:6.789123', '2010-02-03 4:5:6.789123');
Warnings:
@@ -301,7 +309,9 @@ show columns from v1;
Field Type Null Key Default Extra
a time(6) YES NULL
b time(6) YES NULL
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from v1;
+set sql_mode = default;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/r/type_timestamp.result b/mysql-test/r/type_timestamp.result
index 93180218fe4..c2bb6d351c4 100644
--- a/mysql-test/r/type_timestamp.result
+++ b/mysql-test/r/type_timestamp.result
@@ -10,8 +10,12 @@ insert into t1 values(3,NULL);
SET TIMESTAMP=1236;
insert into t1 (a) values(4);
insert into t2 values(5,"2002-03-04"),(6,NULL),(7,"2002-03-05"),(8,"00-00-00");
+Warnings:
+Warning 1264 Out of range value for column 't' at row 4
SET TIMESTAMP=1237;
insert into t1 select * from t2;
+Warnings:
+Warning 1265 Data truncated for column 't' at row 4
SET TIMESTAMP=1238;
insert into t1 (a) select a+1 from t2 where a=8;
select * from t1;
@@ -98,8 +102,9 @@ date date_time time_stamp
2030-01-01 2030-01-01 00:00:00 2030-01-01 00:00:00
drop table t1;
create table t1 (ix timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP);
-insert into t1 values (0),(20030101010160),(20030101016001),(20030101240101),(20030132010101),(20031301010101),(20031200000000),(20030000000000);
+insert ignore into t1 values (0),(20030101010160),(20030101016001),(20030101240101),(20030132010101),(20031301010101),(20031200000000),(20030000000000);
Warnings:
+Warning 1265 Data truncated for column 'ix' at row 1
Warning 1265 Data truncated for column 'ix' at row 2
Warning 1265 Data truncated for column 'ix' at row 3
Warning 1265 Data truncated for column 'ix' at row 4
@@ -118,8 +123,9 @@ ix+0
0
0
truncate table t1;
-insert into t1 values ("00000000000000"),("20030101010160"),("20030101016001"),("20030101240101"),("20030132010101"),("20031301010101"),("20031200000000"),("20030000000000");
+insert ignore into t1 values ("00000000000000"),("20030101010160"),("20030101016001"),("20030101240101"),("20030132010101"),("20031301010101"),("20031200000000"),("20030000000000");
Warnings:
+Warning 1265 Data truncated for column 'ix' at row 1
Warning 1265 Data truncated for column 'ix' at row 2
Warning 1265 Data truncated for column 'ix' at row 3
Warning 1265 Data truncated for column 'ix' at row 4
@@ -138,7 +144,7 @@ ix+0
0
0
truncate table t1;
-insert into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer");
+insert ignore into t1 values ("0000-00-00 00:00:00 some trailer"),("2003-01-01 00:00:00 some trailer");
Warnings:
Warning 1265 Data truncated for column 'ix' at row 1
Warning 1265 Data truncated for column 'ix' at row 2
@@ -149,21 +155,33 @@ ix+0
drop table t1;
create table t1 (t1 timestamp, t2 timestamp default now());
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp, t2 timestamp on update now());
+SET sql_mode = DEFAULT;
drop table t1;
create table t1 (t1 timestamp, t2 timestamp default now() on update now());
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp default now(), t2 timestamp on update now());
+SET sql_mode = DEFAULT;
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp on update now(), t2 timestamp default now() on update now());
+SET sql_mode = DEFAULT;
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp not null default '2003-01-01 00:00:00', t2 datetime, t3 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET TIMESTAMP=1000000000;
-insert into t1 values ();
+insert ignore into t1 values ();
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
SET TIMESTAMP=1000000001;
update t1 set t2=now();
SET TIMESTAMP=1000000002;
-insert into t1 (t1,t3) values (default, default);
+insert ignore into t1 (t1,t3) values (default, default);
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
select * from t1;
t1 t2 t3
2003-01-01 00:00:00 2001-09-09 04:46:41 0000-00-00 00:00:00
@@ -181,13 +199,19 @@ t1 timestamp NO 2003-01-01 00:00:00
t2 datetime YES NULL
t3 timestamp NO 0000-00-00 00:00:00
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp not null default now(), t2 datetime, t3 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET TIMESTAMP=1000000002;
-insert into t1 values ();
+insert ignore into t1 values ();
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
SET TIMESTAMP=1000000003;
update t1 set t2=now();
SET TIMESTAMP=1000000003;
-insert into t1 (t1,t3) values (default, default);
+insert ignore into t1 (t1,t3) values (default, default);
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
select * from t1;
t1 t2 t3
2001-09-09 04:46:42 2001-09-09 04:46:43 0000-00-00 00:00:00
@@ -255,16 +279,22 @@ Field Type Null Key Default Extra
t1 timestamp NO current_timestamp() on update current_timestamp()
t2 datetime YES NULL
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (t1 timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, t2 datetime, t3 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET TIMESTAMP=1000000007;
-insert into t1 values ();
+insert ignore into t1 values ();
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
select * from t1;
t1 t2 t3
2001-09-09 04:46:47 NULL 0000-00-00 00:00:00
SET TIMESTAMP=1000000008;
update t1 set t2=now();
SET TIMESTAMP=1000000008;
-insert into t1 (t1,t3) values (default, default);
+insert ignore into t1 (t1,t3) values (default, default);
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 't3'
select * from t1;
t1 t2 t3
2001-09-09 04:46:48 2001-09-09 04:46:48 0000-00-00 00:00:00
@@ -397,7 +427,9 @@ drop table t1;
create table t1 (a bigint, b bigint);
insert into t1 values (NULL, NULL), (20030101000000, 20030102000000);
set timestamp=1000000019;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, modify b timestamp NOT NULL DEFAULT '0000-00-00 00:00:0';
+SET sql_mode = DEFAULT;
select * from t1;
a b
2001-09-09 04:46:59 2001-09-09 04:46:59
@@ -748,7 +780,9 @@ End of 10.0 tests
# MDEV-7831 Bad warning for DATE_ADD(timestamp_column, INTERVAL 10 SECOND)
#
CREATE TABLE t1 (a TIMESTAMP);
-INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SELECT DATE_ADD(a, INTERVAL 10 SECOND) FROM t1;
DATE_ADD(a, INTERVAL 10 SECOND)
NULL
@@ -759,7 +793,9 @@ DROP TABLE t1;
# MDEV-7824 [Bug #68041] Zero date can be inserted in strict no-zero mode through a default value
#
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
SET sql_mode=TRADITIONAL;
INSERT INTO t1 VALUES ('0000-00-00 00:00:00');
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
@@ -769,16 +805,24 @@ INSERT INTO t1 VALUES (DEFAULT);
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'a'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00', b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
-INSERT INTO t2 VALUES ('0000-00-00 00:00:00');
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 VALUES ('0000-00-00 00:00:00');
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SET sql_mode=TRADITIONAL;
INSERT INTO t1 (a) SELECT a FROM t2;
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'b'
DROP TABLE t1, t2;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00', b TIMESTAMP DEFAULT '0000-00-00 00:00:00');
INSERT INTO t1 VALUES (DEFAULT,DEFAULT);;
+SET sql_mode = DEFAULT;
SELECT a INTO OUTFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1;
DELETE FROM t1;
SET sql_mode=TRADITIONAL;
@@ -786,7 +830,9 @@ LOAD DATA INFILE 'MYSQLTEST_VARDIR/tmp/mdev-7824.txt' INTO TABLE t1 (a);
ERROR 22007: Incorrect default value '0000-00-00 00:00:00' for column 'b'
DROP TABLE t1;
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');;
+SET sql_mode = DEFAULT;
SET sql_mode='NO_ZERO_DATE';
ALTER TABLE t1 ADD b INT NOT NULL;
ERROR 42000: Invalid default value for 'a'
@@ -800,7 +846,9 @@ SET sql_mode=DEFAULT;
#
SET sql_mode=DEFAULT;
CREATE TABLE t1 (a TIMESTAMP);;
-INSERT INTO t1 VALUES (0);
+INSERT IGNORE INTO t1 VALUES (0);
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
SET sql_mode='TRADITIONAL';
CREATE TABLE t2 AS SELECT * FROM t1;
ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'a' at row 1
diff --git a/mysql-test/r/type_timestamp_hires.result b/mysql-test/r/type_timestamp_hires.result
index fc1bd83e04f..11ea64cd1a7 100644
--- a/mysql-test/r/type_timestamp_hires.result
+++ b/mysql-test/r/type_timestamp_hires.result
@@ -7,7 +7,7 @@ insert t1 values ('2010-12-11 00:20:03.1234');
insert t1 values ('2010-12-11 15:47:11.1234');
insert t1 values (20101211010203.45678);
insert t1 values (20101211030405.789e0);
-insert t1 values (99991231235959e1);
+insert ignore t1 values (99991231235959e1);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -34,7 +34,9 @@ a DIV 1
select group_concat(distinct a) from t1;
group_concat(distinct a)
0000-00-00 00:00:00.000,2010-12-11 00:20:03.123,2010-12-11 01:02:03.456,2010-12-11 03:04:05.789,2010-12-11 15:47:11.123
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 engine=innodb;
+set sql_mode = default;
select * from t1 order by a;
a
0000-00-00 00:00:00.000
@@ -95,7 +97,7 @@ a
select a, a + interval 2 year from t1;
a a + interval 2 year
2010-12-11 01:02:13.3332 2012-12-11 01:02:13.3332
-insert t1 select a + interval 2 year from t1;
+insert ignore t1 select a + interval 2 year from t1;
select * from t1;
a
2010-12-11 01:02:13.3332
@@ -145,7 +147,9 @@ t3 CREATE TABLE `t3` (
`avg(a)` decimal(28,8) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2, t3;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (f0_timestamp timestamp(0), f1_timestamp timestamp(1), f2_timestamp timestamp(2), f3_timestamp timestamp(3), f4_timestamp timestamp(4), f5_timestamp timestamp(5), f6_timestamp timestamp(6));
+set sql_mode = default;
insert t1 values ( '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432', '2010-11-12 11:14:17.765432');
select * from t1;
f0_timestamp 2010-11-12 11:14:17
@@ -196,7 +200,9 @@ double_f3_timestamp 20101112111417.766
decimal5_f4_timestamp 20101112111417.76540
bigint_f5_timestamp 20101112111417
varchar_f6_timestamp 2010-11-12 11:14:17.765432
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify time4_f0_timestamp timestamp(0), modify datetime3_f1_timestamp timestamp(1), modify date_f2_timestamp timestamp(2), modify double_f3_timestamp timestamp(3), modify decimal5_f4_timestamp timestamp(4), modify bigint_f5_timestamp timestamp(5), modify varchar_f6_timestamp timestamp(6);
+set sql_mode = default;
select * from t1;
time4_f0_timestamp 2001-02-03 11:14:17
datetime3_f1_timestamp 2010-11-12 11:14:17.7
@@ -216,7 +222,9 @@ decimal5_f4_timestamp 2010-11-12 11:14:17.7654
bigint_f5_timestamp 2010-11-12 11:14:17.00000
varchar_f6_timestamp 2010-11-12 11:14:17.765432
drop table t1, t2;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a timestamp(6)NOT NULL DEFAULT '0000-00-00 00:00:00.000000', b timestamp(6)NOT NULL DEFAULT '0000-00-00 00:00:00.000000');
+set sql_mode = default;
create procedure foo(x timestamp, y timestamp(4)) insert into t1 values (x, y);
call foo('2010-02-03 4:5:6.789123', '2010-02-03 4:5:6.789123');
select * from t1;
@@ -250,7 +258,9 @@ show columns from v1;
Field Type Null Key Default Extra
a timestamp(6) NO 0000-00-00 00:00:00.000000
b timestamp(6) NO 0000-00-00 00:00:00.000000
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from v1;
+set sql_mode = default;
show create table t2;
Table Create Table
t2 CREATE TABLE `t2` (
@@ -306,6 +316,7 @@ Table Create Table
t1 CREATE TABLE `t1` (
`a` timestamp(5) NOT NULL DEFAULT current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create or replace table t1 (a timestamp(5) on update current_timestamp);
show create table t1;
Table Create Table
@@ -333,3 +344,4 @@ t1 CREATE TABLE `t1` (
`a` timestamp(5) NOT NULL DEFAULT '0000-00-00 00:00:00.00000' ON UPDATE current_timestamp(5)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
+set sql_mode = default;
diff --git a/mysql-test/r/type_uint.result b/mysql-test/r/type_uint.result
index c970f2ff896..ef7a7ed98ca 100644
--- a/mysql-test/r/type_uint.result
+++ b/mysql-test/r/type_uint.result
@@ -2,10 +2,10 @@ drop table if exists t1;
SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
-insert into t1 values (-1);
+insert ignore into t1 values (-1);
Warnings:
Warning 1264 Out of range value for column 'this' at row 1
-insert into t1 values ('5000000000');
+insert ignore into t1 values ('5000000000');
Warnings:
Warning 1264 Out of range value for column 'this' at row 1
select * from t1;
diff --git a/mysql-test/r/type_year.result b/mysql-test/r/type_year.result
index 93672abce44..88975281d4b 100644
--- a/mysql-test/r/type_year.result
+++ b/mysql-test/r/type_year.result
@@ -29,7 +29,7 @@ y y2
2069 69
drop table t1;
create table t1 (y year);
-insert into t1 values (now());
+insert ignore into t1 values (now());
Warnings:
Warning 1265 Data truncated for column 'y' at row 1
select if(y = now(), 1, 0) from t1;
@@ -316,7 +316,7 @@ DROP TABLE t2, t4;
# Bug #49910: Behavioural change in SELECT/WHERE on YEAR(4) data type
#
CREATE TABLE t1 (y YEAR NOT NULL, s VARCHAR(4));
-INSERT INTO t1 (s) VALUES ('bad');
+INSERT IGNORE INTO t1 (s) VALUES ('bad');
Warnings:
Warning 1364 Field 'y' doesn't have a default value
INSERT INTO t1 (y, s) VALUES (0, 0), (2000, 2000), (2001, 2001);
@@ -446,40 +446,44 @@ DROP TABLE t1;
# MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
#
CREATE TABLE t1 (a YEAR);
-INSERT INTO t1 VALUES (-0.1);
+INSERT IGNORE INTO t1 VALUES (-0.1);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
DROP TABLE t1;
CREATE TABLE t1 (a YEAR);
CREATE TABLE t2 (a DECIMAL(10,1));
INSERT INTO t2 VALUES (-0.1);
-INSERT INTO t1 SELECT * FROM t2;
+INSERT IGNORE INTO t1 SELECT * FROM t2;
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
DROP TABLE t1,t2;
CREATE TABLE t1 (a DECIMAL(10,1));
INSERT INTO t1 VALUES (-0.1);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a YEAR;
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
+SET sql_mode = DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 (a YEAR);
-INSERT INTO t1 VALUES (-0.1e0);
+INSERT IGNORE INTO t1 VALUES (-0.1e0);
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
DROP TABLE t1;
CREATE TABLE t1 (a YEAR);
CREATE TABLE t2 (a DOUBLE);
INSERT INTO t2 VALUES (-0.1);
-INSERT INTO t1 SELECT * FROM t2;
+INSERT IGNORE INTO t1 SELECT * FROM t2;
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
DROP TABLE t1,t2;
CREATE TABLE t1 (a DOUBLE);
INSERT INTO t1 VALUES (-0.1);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a YEAR;
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
+SET sql_mode = DEFAULT;
DROP TABLE t1;
#
# End of 10.2 tests
diff --git a/mysql-test/r/union.result b/mysql-test/r/union.result
index c3be8d8379c..cd05fd42b07 100644
--- a/mysql-test/r/union.result
+++ b/mysql-test/r/union.result
@@ -1036,6 +1036,7 @@ a
a
150
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( ID1 int(10) unsigned NOT NULL DEFAULT '0' , ID2 datetime NOT NULL DEFAULT '0000-00-00 00:00:00' , DATA1 varchar(10) , DATA2 double(5,4) , DATA3 datetime , PRIMARY KEY (ID1,ID2));
CREATE TABLE t2 ( ID int(3) unsigned NOT NULL DEFAULT '0' , DATA1 timestamp DEFAULT '0000-00-00 00:00:00' , PRIMARY KEY (ID));
(SELECT * FROM t1 AS PARTITIONED, t2 AS
@@ -1064,6 +1065,7 @@ PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1);
ID1 ID2 DATA1 DATA2 DATA3 ID DATA1
drop table t1,t2;
+SET sql_mode = DEFAULT;
create table t1 (a ENUM('Yes', 'No') NOT NULL);
create table t2 (a ENUM('aaa', 'bbb') NOT NULL);
insert into t1 values ('No');
@@ -1121,7 +1123,7 @@ create table t1 as
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `_latin1'test' collate latin1_bin` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
+ `_latin1'test' collate latin1_bin` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select count(*) from t1;
count(*)
@@ -1134,7 +1136,7 @@ create table t1 as
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
+ `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select count(*) from t1;
count(*)
@@ -1147,7 +1149,7 @@ create table t1 as
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
- `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT ''
+ `test` varchar(4) CHARACTER SET latin1 COLLATE latin1_bin DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select count(*) from t1;
count(*)
@@ -1437,6 +1439,7 @@ id
5
99
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1(f1 char(1), f2 char(5), f3 binary(1), f4 binary(5), f5 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', f6 varchar(1) character set utf8 collate utf8_general_ci, f7 text);
create table t2 as select *, f6 as f8 from t1 union select *, f7 from t1;
show create table t2;
@@ -1452,6 +1455,7 @@ t2 CREATE TABLE `t2` (
`f8` mediumtext CHARACTER SET utf8 DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1, t2;
+set sql_mode = default;
(select avg(1)) union (select avg(1)) union (select avg(1)) union
(select avg(1)) union (select avg(1)) union (select avg(1)) union
(select avg(1)) union (select avg(1)) union (select avg(1)) union
diff --git a/mysql-test/r/update.result b/mysql-test/r/update.result
index 73ebb73e313..1172c1cfdec 100644
--- a/mysql-test/r/update.result
+++ b/mysql-test/r/update.result
@@ -354,6 +354,8 @@ a b
drop table t1;
create table t1 (f1 date not null);
insert into t1 values('2000-01-01'),('0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'f1' at row 2
update t1 set f1='2002-02-02' where f1 is null;
select * from t1;
f1
@@ -399,6 +401,7 @@ create table t1(f1 int);
update t1 set f2=1 order by f2;
ERROR 42S22: Unknown column 'f2' in 'order clause'
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
request_id int unsigned NOT NULL auto_increment,
user_id varchar(12) default NULL,
@@ -416,6 +419,7 @@ INSERT INTO t1(user_id) SELECT user_id FROM t1;
INSERT INTO t1(user_id) SELECT user_id FROM t1;
INSERT INTO t1(user_id) SELECT user_id FROM t1;
INSERT INTO t1(user_id) SELECT user_id FROM t1;
+SET sql_mode = DEFAULT;
flush status;
SELECT user_id FROM t1 WHERE request_id=9999999999999;
user_id
diff --git a/mysql-test/r/user_var-binlog.result b/mysql-test/r/user_var-binlog.result
index 9f4762776a6..7ece7fbe080 100644
--- a/mysql-test/r/user_var-binlog.result
+++ b/mysql-test/r/user_var-binlog.result
@@ -30,7 +30,7 @@ use `test`/*!*/;
SET TIMESTAMP=10000/*!*/;
SET @@session.pseudo_thread_id=999999999/*!*/;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=0, @@session.unique_checks=1, @@session.autocommit=1, @@session.check_constraint_checks=1/*!*/;
-SET @@session.sql_mode=1342177280/*!*/;
+SET @@session.sql_mode=1436549120/*!*/;
SET @@session.auto_increment_increment=1, @@session.auto_increment_offset=1/*!*/;
/*!\C latin1 *//*!*/;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index f7968015d48..39b4410b9eb 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -1315,6 +1315,7 @@ s1
3
drop view v1;
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 tinyint);
create trigger t1_bi before insert on t1 for each row set new.s1 = 500;
create view v1 as select * from t1 where s1 <> 127 with check option;
@@ -1327,6 +1328,7 @@ s1
drop trigger t1_bi;
drop view v1;
drop table t1;
+SET sql_mode = default;
create table t1 (s1 tinyint);
create view v1 as select * from t1 where s1 <> 0;
create view v2 as select * from v1 where s1 <> 1 with cascaded check option;
@@ -2796,7 +2798,7 @@ DROP VIEW v1;
DROP TABLE t1,t2;
CREATE TABLE t1 (a INT NOT NULL, b INT NULL DEFAULT NULL);
CREATE VIEW v1 AS SELECT a, b FROM t1;
-INSERT INTO v1 (b) VALUES (2);
+INSERT IGNORE INTO v1 (b) VALUES (2);
Warnings:
Warning 1423 Field of view 'test.v1' underlying table doesn't have a default value
SET SQL_MODE = STRICT_ALL_TABLES;
@@ -3643,7 +3645,7 @@ DROP TABLE t1;
#
create table t1(f1 int, f2 int not null);
create view v1 as select f1 from t1;
-insert into v1 values(1);
+insert ignore into v1 values(1);
Warnings:
Warning 1423 Field of view 'test.v1' underlying table doesn't have a default value
set @old_mode=@@sql_mode;
diff --git a/mysql-test/r/warnings.result b/mysql-test/r/warnings.result
index b4b345ca260..f42096051de 100644
--- a/mysql-test/r/warnings.result
+++ b/mysql-test/r/warnings.result
@@ -29,18 +29,18 @@ show errors;
Level Code Message
Error 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ')' at line 1
insert into t1 values (1);
-insert into t1 values ("hej");
+insert ignore into t1 values ("hej");
Warnings:
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
-insert into t1 values ("hej"),("då");
+insert ignore into t1 values ("hej"),("då");
Warnings:
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
set SQL_WARNINGS=1;
-insert into t1 values ("hej");
+insert ignore into t1 values ("hej");
Warnings:
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
-insert into t1 values ("hej"),("då");
+insert ignore into t1 values ("hej"),("då");
Warnings:
Warning 1366 Incorrect integer value: 'hej' for column 'a' at row 1
Warning 1366 Incorrect integer value: 'då' for column 'a' at row 2
@@ -73,7 +73,7 @@ create table t1(a tinyint, b int not null, c date, d char(5));
load data infile '../../std_data/warnings_loaddata.dat' into table t1 fields terminated by ',';
Warnings:
Warning 1263 Column set to default value; NULL supplied to NOT NULL column 'b' at row 2
-Warning 1265 Data truncated for column 'd' at row 3
+Warning 1406 Data too long for column 'd' at row 3
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
@@ -83,6 +83,7 @@ select @@warning_count;
@@warning_count
7
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
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:
@@ -128,10 +129,11 @@ Warning 1364 Field 'a' doesn't have a default value
Warning 1265 Data truncated for column 'b' at row 1
set sql_warnings=0;
drop table t1, t2;
+set sql_mode = default;
create table t1(a char(10));
alter table t1 add b char;
set max_error_count=10;
-update t1 set b=a;
+update ignore t1 set b=a;
Warnings:
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2
@@ -150,7 +152,7 @@ set max_error_count=0;
show variables like 'max_error_count';
Variable_name Value
max_error_count 0
-update t1 set b='hi';
+update ignore t1 set b='hi';
Warnings:
select @@warning_count;
@@warning_count
@@ -168,7 +170,7 @@ max_error_count 10
drop table t1;
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';
+update ignore t1 set a='abc';
Warnings:
Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 1
Warning 1366 Incorrect integer value: 'abc' for column 'a' at row 2
@@ -235,6 +237,7 @@ Note 1305 PROCEDURE test.sp2 does not exist
DROP PROCEDURE IF EXISTS sp3;
Warnings:
Note 1305 PROCEDURE test.sp3 does not exist
+SET sql_mode = '';
CREATE PROCEDURE sp1()
BEGIN
DECLARE x NUMERIC ZEROFILL;
@@ -259,7 +262,9 @@ Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
CALL sp3();
Warnings:
Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+SET sql_mode = DEFAULT;
DROP PROCEDURE IF EXISTS sp1;
+SET sql_mode = '';
CREATE PROCEDURE sp1()
BEGIN
declare x numeric unsigned zerofill;
@@ -268,6 +273,7 @@ END//
CALL sp1();
Warnings:
Warning 1366 Incorrect decimal value: 'a`' for column 'x' at row 1
+SET sql_mode = DEFAULT;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
diff --git a/mysql-test/r/win.result b/mysql-test/r/win.result
index c8c55b91016..8011a3afb16 100644
--- a/mysql-test/r/win.result
+++ b/mysql-test/r/win.result
@@ -2270,6 +2270,17 @@ pk c CNT
8 2 0.5000
9 2 0.6667
10 2 1.0000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
create view v1 as select pk, c, c/count(*) over (partition by c order by pk
rows between 1 preceding and 2 following) as CNT
from t1;
@@ -2288,6 +2299,17 @@ pk c CNT
8 2 0.5000
9 2 0.6667
10 2 1.0000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
select pk, c, c/count(*) over w1 as CNT from t1
window w1 as (partition by c order by pk rows between 1 preceding and 2 following);
pk c CNT
@@ -2301,6 +2323,17 @@ pk c CNT
8 2 0.5000
9 2 0.6667
10 2 1.0000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
create view v2 as select pk, c, c/count(*) over w1 as CNT from t1
window w1 as (partition by c order by pk rows between 1 preceding and 2 following);
show create view v2;
@@ -2318,6 +2351,17 @@ pk c CNT
8 2 0.5000
9 2 0.6667
10 2 1.0000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
select pk, c, c/count(*) over w1 as CNT from t1
window w1 as (partition by c order by pk rows unbounded preceding);
pk c CNT
@@ -2331,6 +2375,17 @@ pk c CNT
8 2 0.5000
9 2 0.4000
10 2 0.3333
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
create view v3 as select pk, c, c/count(*) over w1 as CNT from t1
window w1 as (partition by c order by pk rows unbounded preceding);
show create view v3;
@@ -2348,6 +2403,17 @@ pk c CNT
8 2 0.5000
9 2 0.4000
10 2 0.3333
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
select pk, c, c/count(*) over (partition by c order by pk
range between 3 preceding and current row) as CNT
from t1;
@@ -2362,6 +2428,17 @@ pk c CNT
8 2 0.5000
9 2 0.5000
10 2 0.5000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
create view v4 as select pk, c, c/count(*) over (partition by c order by pk
range between 3 preceding and current row) as CNT
from t1;
@@ -2380,5 +2457,16 @@ pk c CNT
8 2 0.5000
9 2 0.5000
10 2 0.5000
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
drop view v1,v2,v3,v4;
drop table t0,t1;
diff --git a/mysql-test/r/xtradb_mrr.result b/mysql-test/r/xtradb_mrr.result
index db90ada8053..88e77d6add4 100644
--- a/mysql-test/r/xtradb_mrr.result
+++ b/mysql-test/r/xtradb_mrr.result
@@ -363,12 +363,17 @@ KEY `time_key` (`time_key`),
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=InnoDB;
-INSERT INTO t1 VALUES
+INSERT IGNORE INTO t1 VALUES
(1,5,5,'2009-10-16','2009-10-16','09:28:15','09:28:15','2007-09-14 05:34:08','2007-09-14 05:34:08','qk','qk'),
(2,6,6,'0000-00-00','0000-00-00','23:06:39','23:06:39','0000-00-00 00:00:00','0000-00-00 00:00:00','j','j'),
(3,10,10,'2000-12-18','2000-12-18','22:16:19','22:16:19','2006-11-04 15:42:50','2006-11-04 15:42:50','aew','aew'),
(4,0,0,'2001-09-18','2001-09-18','00:00:00','00:00:00','2004-03-23 13:23:35','2004-03-23 13:23:35',NULL,NULL),
(5,6,6,'2007-08-16','2007-08-16','22:13:38','22:13:38','2004-08-19 11:01:28','2004-08-19 11:01:28','qu','qu');
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 2
+Warning 1264 Out of range value for column 'date_nokey' at row 2
+Warning 1264 Out of range value for column 'datetime_key' at row 2
+Warning 1264 Out of range value for column 'datetime_nokey' at row 2
select pk from t1 WHERE `varchar_key` > 'kr' group by pk;
pk
1
@@ -782,7 +787,7 @@ INSERT INTO t1 VALUES
('MS','Microsoft'),
('IB','IBM- Inc.'),
('GO','Google Inc.');
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
('AB','Sweden'),
('JA','USA'),
('MS','United States of America'),