summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2017-01-18 11:44:47 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2017-01-18 11:44:47 -0500
commita3a91332d006fd39a32e1f6d4663e11515ea944b (patch)
tree560c152c9f8146a4c1bcd52ad2a2fa454be48aec
parent2805baf06c31dac21604148ec089300461790e3d (diff)
downloadmariadb-git-bb-10.2-mdev7635.saved.tar.gz
MDEV-7635: Update tests to adapt to the new default sql_modebb-10.2-mdev7635.savedbb-10.2-mdev7635.final
-rw-r--r--mysql-test/extra/binlog_tests/binlog.test2
-rw-r--r--mysql-test/extra/binlog_tests/ctype_cp932.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_binlog_errors.inc10
-rw-r--r--mysql-test/extra/rpl_tests/rpl_checksum_cache.inc4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extra_col_master.test8
-rw-r--r--mysql-test/extra/rpl_tests/rpl_extra_col_slave.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_gtid_basic.inc4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_not_null.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_record_compare.test4
-rw-r--r--mysql-test/extra/rpl_tests/rpl_row_basic.test30
-rw-r--r--mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc2
-rw-r--r--mysql-test/extra/rpl_tests/rpl_temporal_format_default_to_default.inc2
-rw-r--r--mysql-test/include/add_anonymous_users.inc2
-rw-r--r--mysql-test/include/commit.inc2
-rw-r--r--mysql-test/include/common-tests.inc3
-rw-r--r--mysql-test/include/ctype_common.inc2
-rw-r--r--mysql-test/include/ctype_numconv.inc7
-rw-r--r--mysql-test/include/ctype_unescape.inc3
-rw-r--r--mysql-test/include/ctype_utf8mb4.inc24
-rw-r--r--mysql-test/include/dbt3_s001.inc2
-rw-r--r--mysql-test/include/func_hybrid_type.inc4
-rw-r--r--mysql-test/include/function_defaults.inc2
-rw-r--r--mysql-test/include/icp_tests.inc10
-rw-r--r--mysql-test/include/loaddata_autocom.inc4
-rw-r--r--mysql-test/include/mix1.inc24
-rw-r--r--mysql-test/include/mix2.inc16
-rw-r--r--mysql-test/include/ps_conv.inc21
-rw-r--r--mysql-test/include/ps_modify.inc3
-rw-r--r--mysql-test/include/type_hrtime.inc14
-rw-r--r--mysql-test/include/type_temporal_zero_default.inc14
-rw-r--r--mysql-test/include/world.inc24
-rwxr-xr-xmysql-test/mysql-test-run.pl1
-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
-rw-r--r--mysql-test/suite/archive/archive.result2
-rw-r--r--mysql-test/suite/archive/archive.test2
-rw-r--r--mysql-test/suite/archive/mysqlhotcopy_archive.result6
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result2
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_annotate.result52
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_binlog.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result42
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_binlog.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result42
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result4
-rw-r--r--mysql-test/suite/binlog/r/binlog_stm_user_variables.result20
-rw-r--r--mysql-test/suite/binlog/t/binlog_stm_user_variables.test8
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_row_annotate.result7
-rw-r--r--mysql-test/suite/binlog_encryption/binlog_xa_recover.result7
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_binlog_errors.result1
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_gtid_basic.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result4
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.result2
-rw-r--r--mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.result2
-rw-r--r--mysql-test/suite/csv/csv.result21
-rw-r--r--mysql-test/suite/csv/csv.test19
-rw-r--r--mysql-test/suite/csv/csv_not_null.result21
-rw-r--r--mysql-test/suite/csv/csv_not_null.test13
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_02.result8
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_03.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_06.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_07.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_08.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_03e.result4
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result5
-rw-r--r--mysql-test/suite/funcs_1/r/is_cml_innodb.result14
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns.result4
-rw-r--r--mysql-test/suite/funcs_1/r/is_columns_innodb.result53
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_02.result8
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_03.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_06.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_07.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_08.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_03e.result4
-rw-r--r--mysql-test/suite/funcs_1/r/memory_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_02.result8
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_03.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_06.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_07.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_08.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_storedproc_10.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_03e.result4
-rw-r--r--mysql-test/suite/funcs_1/r/myisam_trig_09.result2
-rw-r--r--mysql-test/suite/funcs_1/r/storedproc.result4
-rw-r--r--mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc4
-rw-r--r--mysql-test/suite/funcs_1/storedproc/storedproc_02.inc5
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_09.inc2
-rw-r--r--mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc7
-rw-r--r--mysql-test/suite/funcs_2/include/check_charset.inc2
-rw-r--r--mysql-test/suite/gcol/inc/gcol_column_def_options.inc4
-rw-r--r--mysql-test/suite/gcol/inc/gcol_ins_upd.inc12
-rw-r--r--mysql-test/suite/gcol/inc/gcol_keys.inc11
-rw-r--r--mysql-test/suite/gcol/inc/gcol_select.inc6
-rw-r--r--mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc4
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result4
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result8
-rw-r--r--mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result12
-rw-r--r--mysql-test/suite/gcol/r/gcol_keys_myisam.result10
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_innodb.result6
-rw-r--r--mysql-test/suite/gcol/r/gcol_select_myisam.result6
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result24
-rw-r--r--mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result24
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_basic.result2
-rw-r--r--mysql-test/suite/gcol/r/innodb_virtual_fk.result4
-rw-r--r--mysql-test/suite/gcol/t/innodb_virtual_fk.test3
-rw-r--r--mysql-test/suite/heap/heap.result2
-rw-r--r--mysql-test/suite/heap/heap.test2
-rw-r--r--mysql-test/suite/innodb/r/data_types.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-autoinc.result34
-rw-r--r--mysql-test/suite/innodb/r/innodb-update-insert.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb-wl5522-debug.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_bug53592.result4
-rw-r--r--mysql-test/suite/innodb/r/innodb_ctype_ldml.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result2
-rw-r--r--mysql-test/suite/innodb/r/innodb_mysql.result392
-rw-r--r--mysql-test/suite/innodb/t/data_types.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-autoinc.test31
-rw-r--r--mysql-test/suite/innodb/t/innodb-update-insert.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb-wl5522-debug.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_bug53592.test4
-rw-r--r--mysql-test/suite/innodb/t/innodb_ctype_ldml.test2
-rw-r--r--mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test2
-rw-r--r--mysql-test/suite/innodb_fts/r/create.result4
-rw-r--r--mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result14
-rw-r--r--mysql-test/suite/innodb_fts/t/create.test4
-rw-r--r--mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test14
-rw-r--r--mysql-test/suite/innodb_gis/r/1.result4
-rw-r--r--mysql-test/suite/innodb_gis/r/alter_spatial_index.result2
-rw-r--r--mysql-test/suite/innodb_gis/r/gis.result4
-rw-r--r--mysql-test/suite/innodb_gis/t/alter_spatial_index.test3
-rw-r--r--mysql-test/suite/innodb_zip/r/bug52745.result4
-rw-r--r--mysql-test/suite/innodb_zip/r/index_large_prefix.result6
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_bug52745.result8
-rw-r--r--mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result6
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36169.test32
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug36172.test2
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_bug52745.test4
-rw-r--r--mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test6
-rw-r--r--mysql-test/suite/maria/icp.result16
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.result4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-dynamic.test4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.result4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree-trans.test4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.result4
-rw-r--r--mysql-test/suite/maria/maria-gis-rtree.test4
-rw-r--r--mysql-test/suite/maria/maria-ucs2.result4
-rw-r--r--mysql-test/suite/maria/maria-ucs2.test4
-rw-r--r--mysql-test/suite/maria/maria.result12
-rw-r--r--mysql-test/suite/maria/maria.test12
-rw-r--r--mysql-test/suite/maria/maria3.result9
-rw-r--r--mysql-test/suite/maria/maria3.test2
-rw-r--r--mysql-test/suite/maria/ps_maria.result26
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result58
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test2
-rw-r--r--mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test6
-rw-r--r--mysql-test/suite/parts/inc/partition_enum.inc2
-rw-r--r--mysql-test/suite/parts/inc/partition_year.inc2
-rw-r--r--mysql-test/suite/perfschema/include/digest_execution.inc2
-rw-r--r--mysql-test/suite/perfschema/r/digest_table_full.result2
-rw-r--r--mysql-test/suite/perfschema/r/dml_setup_objects.result4
-rw-r--r--mysql-test/suite/perfschema/r/setup_objects.result2
-rw-r--r--mysql-test/suite/perfschema/r/start_server_no_digests.result2
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers.result4
-rw-r--r--mysql-test/suite/perfschema/r/statement_digest_consumers2.result2
-rw-r--r--mysql-test/suite/perfschema/t/dml_setup_objects.test4
-rw-r--r--mysql-test/suite/perfschema/t/setup_objects.test2
-rw-r--r--mysql-test/suite/plugins/r/qc_info.result2
-rw-r--r--mysql-test/suite/plugins/r/qc_info_priv.result2
-rw-r--r--mysql-test/suite/roles/definer.result50
-rw-r--r--mysql-test/suite/roles/none_public.result2
-rw-r--r--mysql-test/suite/roles/none_public.test2
-rw-r--r--mysql-test/suite/roles/rpl_definer.result16
-rw-r--r--mysql-test/suite/roles/set_default_role_for.result2
-rw-r--r--mysql-test/suite/roles/set_default_role_for.test2
-rw-r--r--mysql-test/suite/rpl/include/hrtime.inc4
-rw-r--r--mysql-test/suite/rpl/r/rpl_bug31076.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_checksum_cache.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_concurrency_error.result16
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_drop_function.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_do_grant.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_function_defaults.result12
-rw-r--r--mysql-test/suite/rpl/r/rpl_hrtime.result14
-rw-r--r--mysql-test/suite/rpl/r/rpl_hrtime_row.result8
-rw-r--r--mysql-test/suite/rpl/r/rpl_mdev382.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_not_null_innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_not_null_myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_replicate_do.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_rewrt_db.result6
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result33
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result33
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_create_select.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_func002.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_sp_effects.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_000001.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_stm_user_variables.result10
-rw-r--r--mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result2
-rw-r--r--mysql-test/suite/rpl/r/rpl_temporary.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_timezone.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_trigger.result16
-rw-r--r--mysql-test/suite/rpl/t/rpl_bug31076.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_concurrency_error.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_function_defaults.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_rewrt_db.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_create_select.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_row_func002.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_sp_effects.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_000001.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_stm_user_variables.test11
-rw-r--r--mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_temporary.test4
-rw-r--r--mysql-test/suite/rpl/t/rpl_timezone.test4
-rw-r--r--mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc10
-rw-r--r--mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result10
-rw-r--r--mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result10
-rw-r--r--mysql-test/suite/sys_vars/r/slow_query_log_func.result2
-rw-r--r--mysql-test/suite/sys_vars/r/sql_mode_basic.result12
-rw-r--r--mysql-test/suite/sys_vars/r/sql_warnings_func.result6
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_embedded.result4
-rw-r--r--mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result4
-rw-r--r--mysql-test/suite/sys_vars/t/slow_query_log_func.test2
-rw-r--r--mysql-test/suite/sys_vars/t/sql_warnings_func.test6
-rw-r--r--mysql-test/suite/vcol/inc/vcol_ins_upd.inc12
-rw-r--r--mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc4
-rw-r--r--mysql-test/suite/vcol/inc/vcol_trigger_sp.inc7
-rw-r--r--mysql-test/suite/vcol/r/alter_inplace-9045.result2
-rw-r--r--mysql-test/suite/vcol/r/load_data.result2
-rw-r--r--mysql-test/suite/vcol/r/update.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_keys_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_misc.result12
-rw-r--r--mysql-test/suite/vcol/r/vcol_select_myisam.result2
-rw-r--r--mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result520
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result4
-rw-r--r--mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result4
-rw-r--r--mysql-test/suite/vcol/t/alter_inplace-9045.test2
-rw-r--r--mysql-test/suite/vcol/t/load_data.test2
-rw-r--r--mysql-test/suite/vcol/t/update.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_keys_myisam.test2
-rw-r--r--mysql-test/suite/vcol/t/vcol_misc.test15
-rw-r--r--mysql-test/suite/vcol/t/vcol_select_myisam.test2
-rw-r--r--mysql-test/t/adddate_454.test1
-rw-r--r--mysql-test/t/alias.test4
-rw-r--r--mysql-test/t/alter_table.test6
-rw-r--r--mysql-test/t/auto_increment_ranges.inc12
-rw-r--r--mysql-test/t/bigint.test6
-rw-r--r--mysql-test/t/bug13633383.test4
-rw-r--r--mysql-test/t/cast.test6
-rw-r--r--mysql-test/t/comment_column.test3
-rw-r--r--mysql-test/t/comment_index.test5
-rw-r--r--mysql-test/t/create.test16
-rw-r--r--mysql-test/t/ctype_big5.test2
-rw-r--r--mysql-test/t/ctype_cp932_binlog_stm.test4
-rw-r--r--mysql-test/t/ctype_eucjpms.test12
-rw-r--r--mysql-test/t/ctype_euckr.test16
-rw-r--r--mysql-test/t/ctype_gb2312.test2
-rw-r--r--mysql-test/t/ctype_gbk.test20
-rw-r--r--mysql-test/t/ctype_latin1.test2
-rw-r--r--mysql-test/t/ctype_ldml.test2
-rw-r--r--mysql-test/t/ctype_many.test4
-rw-r--r--mysql-test/t/ctype_mb.test2
-rw-r--r--mysql-test/t/ctype_recoding.test2
-rw-r--r--mysql-test/t/ctype_sjis.test4
-rw-r--r--mysql-test/t/ctype_tis620.test2
-rw-r--r--mysql-test/t/ctype_ucs.test8
-rw-r--r--mysql-test/t/ctype_ujis.test14
-rw-r--r--mysql-test/t/ctype_ujis_ucs2.test4
-rw-r--r--mysql-test/t/ctype_utf16.test10
-rw-r--r--mysql-test/t/ctype_utf16le.test12
-rw-r--r--mysql-test/t/ctype_utf32.test26
-rw-r--r--mysql-test/t/ctype_utf8.test28
-rw-r--r--mysql-test/t/ctype_utf8mb4.test34
-rw-r--r--mysql-test/t/date_formats.test12
-rw-r--r--mysql-test/t/default.test24
-rw-r--r--mysql-test/t/default_session.test2
-rw-r--r--mysql-test/t/delete.test2
-rw-r--r--mysql-test/t/derived.test2
-rw-r--r--mysql-test/t/derived_view.test4
-rw-r--r--mysql-test/t/distinct.test4
-rw-r--r--mysql-test/t/events_restart.test2
-rw-r--r--mysql-test/t/failed_auth_3909.test2
-rw-r--r--mysql-test/t/fulltext.test2
-rw-r--r--mysql-test/t/func_gconcat.test4
-rw-r--r--mysql-test/t/func_hybrid_type.test2
-rw-r--r--mysql-test/t/func_in.test6
-rw-r--r--mysql-test/t/func_like.test2
-rw-r--r--mysql-test/t/func_math.test2
-rw-r--r--mysql-test/t/func_regexp_pcre.test4
-rw-r--r--mysql-test/t/func_set.test2
-rw-r--r--mysql-test/t/func_str.test4
-rw-r--r--mysql-test/t/func_test.test2
-rw-r--r--mysql-test/t/func_time.test20
-rw-r--r--mysql-test/t/get_diagnostics.test2
-rw-r--r--mysql-test/t/gis-rtree.test4
-rw-r--r--mysql-test/t/gis.test2
-rw-r--r--mysql-test/t/group_by.test12
-rw-r--r--mysql-test/t/having.test2
-rw-r--r--mysql-test/t/help.test16
-rw-r--r--mysql-test/t/insert.test24
-rw-r--r--mysql-test/t/insert_select.test8
-rw-r--r--mysql-test/t/join.test2
-rw-r--r--mysql-test/t/join_outer.test4
-rw-r--r--mysql-test/t/join_outer_innodb.test2
-rw-r--r--mysql-test/t/key.test8
-rw-r--r--mysql-test/t/limit_rows_examined.test2
-rw-r--r--mysql-test/t/loaddata.test12
-rw-r--r--mysql-test/t/mdev-504.test2
-rw-r--r--mysql-test/t/multi_update.test6
-rw-r--r--mysql-test/t/myisam-blob.test4
-rw-r--r--mysql-test/t/myisam.test10
-rw-r--r--mysql-test/t/mysqldump.test2
-rw-r--r--mysql-test/t/mysqlslap.opt1
-rw-r--r--mysql-test/t/null.test9
-rw-r--r--mysql-test/t/null_key.test2
-rw-r--r--mysql-test/t/old-mode.test10
-rw-r--r--mysql-test/t/order_by.test3
-rw-r--r--mysql-test/t/packet.test2
-rw-r--r--mysql-test/t/partition_binlog_stmt.test2
-rw-r--r--mysql-test/t/partition_datatype.test46
-rw-r--r--mysql-test/t/partition_default.test8
-rw-r--r--mysql-test/t/partition_error.test10
-rw-r--r--mysql-test/t/partition_exchange.test10
-rw-r--r--mysql-test/t/partition_innodb.test2
-rw-r--r--mysql-test/t/partition_pruning.test12
-rw-r--r--mysql-test/t/plugin_auth.test2
-rw-r--r--mysql-test/t/ps.test6
-rw-r--r--mysql-test/t/query_cache.test2
-rw-r--r--mysql-test/t/quick_select_4161.test1
-rw-r--r--mysql-test/t/range.test6
-rw-r--r--mysql-test/t/round.test32
-rw-r--r--mysql-test/t/row.test2
-rw-r--r--mysql-test/t/select.test14
-rw-r--r--mysql-test/t/selectivity.test2
-rw-r--r--mysql-test/t/show_check.test2
-rw-r--r--mysql-test/t/signal.test12
-rw-r--r--mysql-test/t/sp-destruct.test14
-rw-r--r--mysql-test/t/sp-dynamic.test2
-rw-r--r--mysql-test/t/sp-error.test22
-rw-r--r--mysql-test/t/sp_notembedded.test4
-rw-r--r--mysql-test/t/strict.test3
-rw-r--r--mysql-test/t/subselect.test20
-rw-r--r--mysql-test/t/subselect2.test7
-rw-r--r--mysql-test/t/subselect4.test2
-rw-r--r--mysql-test/t/subselect_cache.test2
-rw-r--r--mysql-test/t/subselect_innodb.test2
-rw-r--r--mysql-test/t/subselect_sj.test6
-rw-r--r--mysql-test/t/subselect_sj_mat.test2
-rw-r--r--mysql-test/t/system_mysql_db_refs.test12
-rw-r--r--mysql-test/t/temporal_literal.test24
-rw-r--r--mysql-test/t/timezone2.test6
-rw-r--r--mysql-test/t/trigger.test7
-rw-r--r--mysql-test/t/type_binary.test4
-rw-r--r--mysql-test/t/type_bit.test6
-rw-r--r--mysql-test/t/type_bit_innodb.test4
-rw-r--r--mysql-test/t/type_blob.test12
-rw-r--r--mysql-test/t/type_date.test14
-rw-r--r--mysql-test/t/type_datetime.test40
-rw-r--r--mysql-test/t/type_datetime_hires.test4
-rw-r--r--mysql-test/t/type_decimal.test52
-rw-r--r--mysql-test/t/type_enum.test12
-rw-r--r--mysql-test/t/type_float.test28
-rw-r--r--mysql-test/t/type_newdecimal.test22
-rw-r--r--mysql-test/t/type_num.test22
-rw-r--r--mysql-test/t/type_ranges.test18
-rw-r--r--mysql-test/t/type_set.test2
-rw-r--r--mysql-test/t/type_temporal_innodb.test16
-rw-r--r--mysql-test/t/type_time.test8
-rw-r--r--mysql-test/t/type_timestamp.test34
-rw-r--r--mysql-test/t/type_timestamp_hires.test2
-rw-r--r--mysql-test/t/type_uint.test4
-rw-r--r--mysql-test/t/type_year.test16
-rw-r--r--mysql-test/t/union.test4
-rw-r--r--mysql-test/t/update.test2
-rw-r--r--mysql-test/t/view.test7
-rw-r--r--mysql-test/t/warnings.test20
-rw-r--r--mysql-test/t/xtradb_mrr.test4
-rw-r--r--storage/connect/mysql-test/connect/r/dir.result2
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_exec.result13
-rw-r--r--storage/connect/mysql-test/connect/r/mysql_new.result2
-rw-r--r--storage/connect/mysql-test/connect/r/unsigned.result4
-rw-r--r--storage/connect/mysql-test/connect/r/upd.result2
-rw-r--r--storage/connect/mysql-test/connect/t/dir.test2
-rw-r--r--storage/connect/mysql-test/connect/t/mysql_exec.test2
-rw-r--r--storage/connect/mysql-test/connect/t/mysql_new.test2
-rw-r--r--storage/connect/mysql-test/connect/t/unsigned.test4
-rw-r--r--storage/connect/mysql-test/connect/t/upd.test4
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result7
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result8
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test6
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test7
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test8
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test2
-rw-r--r--storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test2
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result8
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result4
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_not_null_tokudb.result4
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result33
-rw-r--r--storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/6684.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/db945.result2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/r/leak172.result3
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/6684.test8
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test4
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/db945.test2
-rw-r--r--storage/tokudb/mysql-test/tokudb_bugs/t/leak172.test3
679 files changed, 7063 insertions, 3981 deletions
diff --git a/mysql-test/extra/binlog_tests/binlog.test b/mysql-test/extra/binlog_tests/binlog.test
index 831c6c886d5..810a402580c 100644
--- a/mysql-test/extra/binlog_tests/binlog.test
+++ b/mysql-test/extra/binlog_tests/binlog.test
@@ -272,7 +272,7 @@ create table if not exists t3 like tt1;
--disable_warnings
USE mysql;
-INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
+INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
--enable_warnings
diff --git a/mysql-test/extra/binlog_tests/ctype_cp932.test b/mysql-test/extra/binlog_tests/ctype_cp932.test
index 33247550d62..f42bffd30df 100644
--- a/mysql-test/extra/binlog_tests/ctype_cp932.test
+++ b/mysql-test/extra/binlog_tests/ctype_cp932.test
@@ -436,9 +436,9 @@ drop table t2;
#
create table t1 (col1 varchar(1)) character set cp932;
insert into t1 values ('a');
-insert into t1 values ('ab');
+insert ignore into t1 values ('ab');
select * from t1;
-insert into t1 values ('abc');
+insert ignore into t1 values ('abc');
select * from t1;
drop table t1;
diff --git a/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc b/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc
index c595d70daa1..29731e823ce 100644
--- a/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc
+++ b/mysql-test/extra/rpl_tests/rpl_binlog_errors.inc
@@ -192,6 +192,11 @@ RESET MASTER;
### is written to the current binary log.
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
+
+# Disable logging Annotate_rows events to preserve events count.
+let $binlog_annotate_row_events_saved= `SELECT @@binlog_annotate_row_events`;
+SET @@binlog_annotate_row_events= 0;
+
SELECT count(*) FROM t4;
-- replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
-- error ER_NO_UNIQUE_LOGFILE
@@ -210,6 +215,11 @@ if (!$binlog_limit)
# clean up and move to next test
DELETE FROM t4;
+
+--disable_query_log
+eval SET @@binlog_annotate_row_events= $binlog_annotate_row_events_saved;
+--enable_query_log
+
RESET MASTER;
-- echo ###################### TEST #8
diff --git a/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc b/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc
index a10c9721f70..e04f618b81e 100644
--- a/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc
+++ b/mysql-test/extra/rpl_tests/rpl_checksum_cache.inc
@@ -8,8 +8,8 @@
-- source include/master-slave.inc
--disable_warnings
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t2 set data=repeat.*'a', @act_size.*");
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
--enable_warnings
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
index 0559e93676b..47a44709fcc 100644
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_master.test
@@ -253,9 +253,9 @@ some var char';
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
binary data';
INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
- INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+ INSERT ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
- INSERT into t31 values (1, 1, 3, 'third',
+ INSERT ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -289,7 +289,7 @@ binary data';
/*f35 VARCHAR(257),*/ 'three times three'
);
- INSERT into t31 values (1, 1, 4, 'fourth',
+ INSERT ignore into t31 values (1, 1, 4, 'fourth',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -408,7 +408,7 @@ connection master;
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
- update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+ update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
--echo
--echo ** Delete from Master **
diff --git a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
index a58fa85a72d..fac96e33cd3 100644
--- a/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
+++ b/mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
@@ -308,10 +308,12 @@ DROP TABLE t6;
--echo *** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
ENGINE=$engine_type;
+SET sql_mode = DEFAULT;
--echo *** Create t7 on Master ***
connection master;
@@ -350,9 +352,11 @@ sync_slave_with_master;
--echo *** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE=$engine_type;
+SET sql_mode = DEFAULT;
--echo *** Create t8 on Master ***
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc b/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc
index ab7d23f70ac..68a5d05ffe9 100644
--- a/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc
+++ b/mysql-test/extra/rpl_tests/rpl_gtid_basic.inc
@@ -455,9 +455,13 @@ SELECT IF(LOCATE("2-1-1022", @@GLOBAL.gtid_slave_pos)>0, "Ok", CONCAT("ERROR! ex
--connection server_1
SET gtid_domain_id=2;
SET gtid_seq_no=1030;
+# Disable logging Annotate_rows events to preserve events count.
+let $binlog_annotate_row_events_saved= `SELECT @@binlog_annotate_row_events`;
+SET @@binlog_annotate_row_events= 0;
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
+eval SET @@binlog_annotate_row_events= $binlog_annotate_row_events_saved;
--save_master_pos
--connection server_2
diff --git a/mysql-test/extra/rpl_tests/rpl_not_null.test b/mysql-test/extra/rpl_tests/rpl_not_null.test
index cbb6b787f11..c1e2a113492 100644
--- a/mysql-test/extra/rpl_tests/rpl_not_null.test
+++ b/mysql-test/extra/rpl_tests/rpl_not_null.test
@@ -38,12 +38,16 @@ PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
eval CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
`c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
PRIMARY KEY(`a`)) ENGINE=$engine DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
--echo ************* EXECUTION WITH INSERTS *************
connection master;
diff --git a/mysql-test/extra/rpl_tests/rpl_record_compare.test b/mysql-test/extra/rpl_tests/rpl_record_compare.test
index b674b76dfdf..2bc088d17b4 100644
--- a/mysql-test/extra/rpl_tests/rpl_record_compare.test
+++ b/mysql-test/extra/rpl_tests/rpl_record_compare.test
@@ -12,7 +12,7 @@
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-- disable_warnings
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
-- enable_warnings
-- sync_slave_with_master
@@ -33,7 +33,7 @@ DROP TABLE t1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-- disable_warnings
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
-- enable_warnings
-- sync_slave_with_master
diff --git a/mysql-test/extra/rpl_tests/rpl_row_basic.test b/mysql-test/extra/rpl_tests/rpl_row_basic.test
index 2e1007b1c04..33d5dd328f3 100644
--- a/mysql-test/extra/rpl_tests/rpl_row_basic.test
+++ b/mysql-test/extra/rpl_tests/rpl_row_basic.test
@@ -623,33 +623,33 @@ eval CREATE TABLE t1 (a bit) ENGINE=$type;
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
-INSERT INTO t1 ( a ) VALUES ( 5 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
DELETE FROM t1 WHERE a < 2 LIMIT 4;
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 9 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 9 );
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 8 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 8 );
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
-INSERT INTO t1 ( a ) VALUES ( 4 );
-INSERT INTO t1 ( a ) VALUES ( 3 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 4 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
DELETE FROM t1 WHERE a = 4 LIMIT 7;
-UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9;
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
DELETE FROM t1 WHERE a < 0 LIMIT 5;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8;
DELETE FROM t1 WHERE a < 8 LIMIT 8;
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
DELETE FROM t1 WHERE a < 6 LIMIT 7;
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 7 );
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
DELETE FROM t1 WHERE a = 2 LIMIT 9;
DELETE FROM t1 WHERE a = 1 LIMIT 4;
@@ -658,7 +658,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 );
DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3;
--enable_warnings
sync_slave_with_master;
diff --git a/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc b/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc
index e74fd6828c6..7ac8fcf2f32 100644
--- a/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc
+++ b/mysql-test/extra/rpl_tests/rpl_switch_stm_row_mixed.inc
@@ -155,6 +155,7 @@ insert into t1 select "yesterday_24_";
create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
create table t3 select 1 union select UUID();
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--disable_warnings
create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
--enable_warnings
@@ -163,6 +164,7 @@ create table t5 select * from t1 where 3 in (select 1 union select 2 union selec
--disable_warnings
insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
--enable_warnings
+SET sql_mode = DEFAULT;
# inside a stored procedure
diff --git a/mysql-test/extra/rpl_tests/rpl_temporal_format_default_to_default.inc b/mysql-test/extra/rpl_tests/rpl_temporal_format_default_to_default.inc
index 6728ff55d6f..ac534327508 100644
--- a/mysql-test/extra/rpl_tests/rpl_temporal_format_default_to_default.inc
+++ b/mysql-test/extra/rpl_tests/rpl_temporal_format_default_to_default.inc
@@ -34,6 +34,7 @@ CREATE TABLE t1
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -44,6 +45,7 @@ CREATE TABLE t2
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
diff --git a/mysql-test/include/add_anonymous_users.inc b/mysql-test/include/add_anonymous_users.inc
index a59aa971d59..635a80e3dee 100644
--- a/mysql-test/include/add_anonymous_users.inc
+++ b/mysql-test/include/add_anonymous_users.inc
@@ -1,7 +1,7 @@
# Allow anonymous users to connect
disable_warnings;
disable_query_log;
-INSERT INTO mysql.user (host, user) VALUES ('localhost','');
+INSERT IGNORE INTO mysql.user (host, user) VALUES ('localhost','');
FLUSH PRIVILEGES;
enable_query_log;
enable_warnings;
diff --git a/mysql-test/include/commit.inc b/mysql-test/include/commit.inc
index 830ffb52c02..a28d3e5f3d1 100644
--- a/mysql-test/include/commit.inc
+++ b/mysql-test/include/commit.inc
@@ -267,7 +267,7 @@ select * from t2;
insert into t2 (a) values (1026);
--replace_result $MYSQLTEST_VARDIR ..
--error ER_DUP_ENTRY
-eval load data infile "../../std_data/words.dat" into table t1 (a) set a:=f2(26);
+eval load data infile "../../std_data/words.dat" ignore into table t1 (a) set a:=f2(26);
select * from t2;
rollback;
diff --git a/mysql-test/include/common-tests.inc b/mysql-test/include/common-tests.inc
index 204b6d4dd6b..e47ee0fcbd8 100644
--- a/mysql-test/include/common-tests.inc
+++ b/mysql-test/include/common-tests.inc
@@ -1773,6 +1773,7 @@ show keys from t2;
drop table t4, t3, t2, t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
cont_nr int(11) NOT NULL auto_increment,
@@ -1824,6 +1825,8 @@ CREATE TABLE t1 (
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/include/ctype_common.inc b/mysql-test/include/ctype_common.inc
index 4cb04599679..a39c25f2cc8 100644
--- a/mysql-test/include/ctype_common.inc
+++ b/mysql-test/include/ctype_common.inc
@@ -58,7 +58,7 @@ DROP TABLE t1;
# Bug #32726: crash with cast in order by clause and cp932 charset
#
create table t1 (a set('a') not null);
-insert into t1 values (),();
+insert ignore into t1 values (),();
select cast(a as char(1)) from t1;
select a sounds like a from t1;
select 1 from t1 order by cast(a as char(1));
diff --git a/mysql-test/include/ctype_numconv.inc b/mysql-test/include/ctype_numconv.inc
index 6bda2205c0e..7b2fa993164 100644
--- a/mysql-test/include/ctype_numconv.inc
+++ b/mysql-test/include/ctype_numconv.inc
@@ -739,7 +739,10 @@ show create table t1;
drop table t1;
select hex(concat(period_diff(200902, 200802)));
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
create table t1 as select concat(period_add(200902, 200802)) as c1;
+set sql_mode = default;
show create table t1;
drop table t1;
@@ -1167,7 +1170,7 @@ show create table t2;
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);
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
@@ -1479,7 +1482,7 @@ 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);
insert into t1 values (20010203040506);
insert into t1 values (19800203040506);
insert into t1 values ('2001-02-03 04:05:06');
diff --git a/mysql-test/include/ctype_unescape.inc b/mysql-test/include/ctype_unescape.inc
index 5d67bf8d189..171843ff66a 100644
--- a/mysql-test/include/ctype_unescape.inc
+++ b/mysql-test/include/ctype_unescape.inc
@@ -1,5 +1,7 @@
--echo # Start of ctype_unescape.inc
+SET sql_mode = '';
+
#
# Testing how string literals with backslash and quote-quote are unescaped.
# The tests assume that single quote (') is used as a delimiter.
@@ -323,5 +325,6 @@ DROP FUNCTION wellformedness;
DROP FUNCTION mysql_real_escape_string_generated;
DROP FUNCTION iswellformed;
DROP TABLE allbytes;
+SET sql_mode = DEFAULT;
--echo # End of ctype_backslash.inc
diff --git a/mysql-test/include/ctype_utf8mb4.inc b/mysql-test/include/ctype_utf8mb4.inc
index 71993a946b3..50e8eaead5a 100644
--- a/mysql-test/include/ctype_utf8mb4.inc
+++ b/mysql-test/include/ctype_utf8mb4.inc
@@ -123,6 +123,7 @@ set LC_TIME_NAMES='en_US';
# Bug #2366 Wrong utf8mb4 behaviour when data is truncated
#
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval create table t1 (s1 char(1) character set utf8mb4) engine $engine;
insert into t1 values (_koi8r'ÁÂ');
select s1,hex(s1),char_length(s1),octet_length(s1) from t1;
@@ -163,10 +164,12 @@ insert into t1 select repeat('ÑÑ',66000);
--sorted_result
select length(s1),char_length(s1) from t1;
drop table t1;
+set sql_mode = default;
#
# Bug #2368 Multibyte charsets do not check that incoming data is well-formed
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval create table t1 (s1 char(10) character set utf8mb4) engine $engine;
insert into t1 values (0x41FF);
select hex(s1) from t1;
@@ -184,6 +187,7 @@ insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
}
+set sql_mode = default;
#
# Bug 2699
@@ -850,6 +854,7 @@ eval create table t1 (x enum('A', 'B') default 0) character set utf8mb4 engine $
#
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
@@ -888,6 +893,7 @@ INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25');
SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
#
# Bug#11591: CHAR column with utf8mb4 does not work properly
@@ -895,7 +901,9 @@ DROP TABLE t1,t2;
#
eval create table t1 (a char(20) character set utf8mb4) engine $engine;
insert into t1 values ('123456'),('андрей');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify a char(2) character set utf8mb4;
+SET sql_mode = DEFAULT;
select char_length(a), length(a), a from t1 order by a;
drop table t1;
@@ -1276,6 +1284,7 @@ DROP TABLE t1;
# Bug#20095 Changing length of VARCHAR field with UTF8
# collation does not truncate values
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval create table t1 (
a varchar(26) not null
) default character set utf8mb4 ENGINE $engine;
@@ -1305,6 +1314,7 @@ insert into t1 values (repeat('a',4000));
alter table t1 change a a varchar(3000) character set utf8mb4 not null;
select length(a) from t1;
drop table t1;
+SET sql_mode = DEFAULT;
#
# Bug#10504: Character set does not support traditional mode
@@ -1552,7 +1562,9 @@ eval create table t1 (utf8mb4 char(1) character set utf8mb4) engine $engine;
--echo Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values (0xF08F8080);
+insert ignore into t1 values (0xF08F8080);
--sorted_result
select hex(utf8mb4) from t1;
delete from t1;
@@ -1567,7 +1579,9 @@ delete from t1;
--echo Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values (0xF4908080);
+insert ignore into t1 values (0xF4908080);
--sorted_result
select hex(utf8mb4) from t1;
drop table t1;
@@ -1648,13 +1662,15 @@ INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859
# Mix of 3-byte and 4-byte chars
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
# All from musical chars, but 11 instead of 10 chars. truncated
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
--sorted_result
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
# First invalid 4 byte value
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
INSERT INTO t1 VALUES (1114111, x'f5808080');
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
--sorted_result
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
@@ -1672,14 +1688,18 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
# SMALL COMMERCIAL AT
INSERT INTO t2 VALUES (65131, x'efb9ab');
# <Plane 16 Private Use, Last> (last 4 byte character)
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
--sorted_result
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
# Update a 3-byte char col with a 4-byte char, error
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
# Update to a 3-byte char casted to 4-byte, error?
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -1700,7 +1720,9 @@ SELECT count(*) FROM t1, t2
# Alter from 4-byte charset to 3-byte charset, error
--disable_warnings
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+set sql_mode = default;
--enable_warnings
SHOW CREATE TABLE t1;
--sorted_result
diff --git a/mysql-test/include/dbt3_s001.inc b/mysql-test/include/dbt3_s001.inc
index 6a85e7052e9..e0eb3596d90 100644
--- a/mysql-test/include/dbt3_s001.inc
+++ b/mysql-test/include/dbt3_s001.inc
@@ -8989,9 +8989,11 @@ INSERT INTO supplier VALUES
(8,'Supplier#000000008','9Sq4bBH2FQEmaFOocY45sRTxo6yuoG',17,'27-498-742-3860',7627.85,'carefully express escapades are slyly '),
(9,'Supplier#000000009','1KhUgZegwM3ua7dsYmekYBsK',10,'20-403-398-8662',5302.37,'slyly regular decoys mold slyly ironic dugouts. requests are carefully-- carefully'),(10,'Supplier#000000010','Saygah3gYWMp72i PY',24,'34-852-489-8585',3891.91,'ironic deposits poach quickly furiously final accounts. carefull');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE time_statistics (
task_name varchar(40) DEFAULT NULL,
s_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
e_time timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
int_time int(11) DEFAULT NULL
);
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/include/func_hybrid_type.inc b/mysql-test/include/func_hybrid_type.inc
index 854c7ebd34e..05139e249c9 100644
--- a/mysql-test/include/func_hybrid_type.inc
+++ b/mysql-test/include/func_hybrid_type.inc
@@ -39,6 +39,7 @@ FROM t1;
--horizontal_results
--disable_metadata
--enable_ps_protocol
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS
SELECT
a AS ___________a,
@@ -60,8 +61,10 @@ SELECT
LEAST(b, b) AS least____b_b,
GREATEST(b, b) AS greatest_b_b
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
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,
@@ -77,5 +80,6 @@ SELECT
GREATEST(a, b) AS greatest_a_b,
GREATEST(b, a) AS greatest_b_a
FROM t1;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
DROP TABLE t2;
diff --git a/mysql-test/include/function_defaults.inc b/mysql-test/include/function_defaults.inc
index 7c5d43b6e74..1d38d7c6843 100644
--- a/mysql-test/include/function_defaults.inc
+++ b/mysql-test/include/function_defaults.inc
@@ -1,4 +1,5 @@
SET TIME_ZONE = "+00:00";
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--echo #
--echo # Test of errors for column data types that dont support function
@@ -1168,3 +1169,4 @@ INSERT INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/include/icp_tests.inc b/mysql-test/include/icp_tests.inc
index 88d6923d8f9..01ca9ead034 100644
--- a/mysql-test/include/icp_tests.inc
+++ b/mysql-test/include/icp_tests.inc
@@ -72,7 +72,7 @@ CREATE TABLE t1(
);
--echo
-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');
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');
@@ -101,7 +101,7 @@ CREATE TABLE t1(
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),
@@ -509,7 +509,7 @@ CREATE TABLE t2 (
);
--disable_warnings
-INSERT INTO t2 VALUES ();
+INSERT IGNORE INTO t2 VALUES ();
INSERT INTO t1 VALUES ();
--enable_warnings
@@ -610,7 +610,7 @@ CREATE TABLE t1 (
KEY idx4267 (col1000, col1003)
);
-INSERT INTO t1 VALUES (),();
+INSERT IGNORE INTO t1 VALUES (),();
SELECT col999 FROM t1 WHERE col1000 = "3" AND col1003 <=> sysdate();
DROP TABLE t1;
@@ -888,7 +888,7 @@ DROP TABLE t1;
# MDEV-308 lp:1008516 - Failing assertion: templ->mysql_col_len == len
#
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');
select 1 from t1 where a and b >= 'aa';
drop table t1;
diff --git a/mysql-test/include/loaddata_autocom.inc b/mysql-test/include/loaddata_autocom.inc
index 3bf88fefa6d..7b0c67d2ca8 100644
--- a/mysql-test/include/loaddata_autocom.inc
+++ b/mysql-test/include/loaddata_autocom.inc
@@ -11,13 +11,13 @@ let $load_file= $MYSQLTEST_VARDIR/std_data/loaddata2.dat;
create table t1 (id int unsigned not null auto_increment primary key, a text, b text);
start transaction;
--replace_result $load_file LOAD_FILE
-eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b);
+eval load data infile '$load_file' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b);
commit;
select count(*) from t1;
truncate table t1;
start transaction;
--replace_result $load_file LOAD_FILE
-eval load data infile '$load_file' into table t1 fields terminated by ',' enclosed by '''' (a, b);
+eval load data infile '$load_file' ignore into table t1 fields terminated by ',' enclosed by '''' (a, b);
rollback;
select count(*) from t1;
diff --git a/mysql-test/include/mix1.inc b/mysql-test/include/mix1.inc
index ea7bc3f5327..fb53580568a 100644
--- a/mysql-test/include/mix1.inc
+++ b/mysql-test/include/mix1.inc
@@ -201,7 +201,7 @@ DROP TABLE t1;
#
# Bug #28272: EXPLAIN for SELECT from an empty InnoDB table
#
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a1 decimal(10,0) DEFAULT NULL,
a2 blob,
@@ -212,7 +212,7 @@ CREATE TABLE t1 (
a7 tinyblob,
INDEX idx (a6,a7(239),a5)
) ENGINE=InnoDB;
-
+SET sql_mode = DEFAULT;
EXPLAIN SELECT a4 FROM t1 WHERE
a6=NULL AND
a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
@@ -573,14 +573,14 @@ INSERT INTO t1(stat_id,acct_id) VALUES
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
UPDATE t1 SET acct_id=785
WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id);
OPTIMIZE TABLE t1;
@@ -987,7 +987,9 @@ DROP TABLE t1;
#
create table t1(a text) engine=innodb default charset=utf8;
insert into t1 values('aaa');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 add index(a(1024));
+SET sql_mode = DEFAULT;
show create table t1;
drop table t1;
@@ -1558,7 +1560,9 @@ if ($test_foreign_keys)
# auto_increment keys
#
create table t1 (a int auto_increment primary key) engine=innodb;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 order by a;
+SET sql_mode = DEFAULT;
drop table t1;
#
diff --git a/mysql-test/include/mix2.inc b/mysql-test/include/mix2.inc
index 24097514c21..83d5a5c54b6 100644
--- a/mysql-test/include/mix2.inc
+++ b/mysql-test/include/mix2.inc
@@ -722,6 +722,7 @@ drop table t1;
# Test of multi-table-delete
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t1 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -735,12 +736,14 @@ eval CREATE TABLE t1 (
assigned_scps int(11) default '0',
status tinyint(4) default '0'
) ENGINE=$engine_type;
-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);
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);
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';
eval CREATE TABLE t2 (
number bigint(20) NOT NULL default '0',
cname char(15) NOT NULL default '',
@@ -754,9 +757,10 @@ eval CREATE TABLE t2 (
assigned_scps int(11) default '0',
status tinyint(4) default '0'
) ENGINE=$engine_type;
-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);
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);
INSERT INTO t2 VALUES (333,'tubs',99,2,20020109113453,501,20020109113453,500,3,10,0);
select * from t1;
select * from t2;
@@ -1470,10 +1474,14 @@ source include/varchar.inc;
--replace_result \\ / $MYSQL_TEST_DIR . /var/mysqld.1/data/ / t1.frm t1
create table t1 (v varchar(65530), key(v));
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65536));
+SET sql_mode = DEFAULT;
show create table t1;
drop table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65530) character set utf8);
+SET sql_mode = DEFAULT;
show create table t1;
drop table t1;
diff --git a/mysql-test/include/ps_conv.inc b/mysql-test/include/ps_conv.inc
index 2e42542d19a..fe74f625ff6 100644
--- a/mysql-test/include/ps_conv.inc
+++ b/mysql-test/include/ps_conv.inc
@@ -576,8 +576,10 @@ prepare my_delete from "delete from t9 where c21 = 'O' ";
#
# Use the maximum BIGINT from the manual
set @arg00= 9223372036854775807 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -585,8 +587,10 @@ execute my_select ;
--replace_result e+0 e+
execute my_delete ;
set @arg00= '9223372036854775807' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -596,8 +600,10 @@ execute my_delete ;
# Use the minimum BIGINT from the manual
#
set @arg00= -9223372036854775808 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -605,8 +611,10 @@ execute my_select ;
--replace_result e+0 e+
execute my_delete ;
set @arg00= '-9223372036854775808' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -618,8 +626,10 @@ execute my_delete ;
# (FLOAT,REAL,DOUBLE) during insert
#
set @arg00= 1.11111111111111111111e+50 ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -630,8 +640,10 @@ execute my_delete ;
# because the string is treated as written integer and
# '.11111111111111111111e+50' is cut away.
set @arg00= '1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -639,8 +651,10 @@ execute my_select ;
--replace_result e+0 e+
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 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -651,8 +665,10 @@ execute my_delete ;
# because the string is treated as written integer and
# '.11111111111111111111e+50' is cut away.
set @arg00= '-1.11111111111111111111e+50' ;
+set sql_mode = '';
execute my_insert using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
--vertical_results
--replace_result e+0 e+
execute my_select ;
@@ -672,6 +688,7 @@ select '-- insert into string columns --' as test_sequence ;
--enable_query_log
######## INSERT into .. string columns values(CHAR(n),LONGTEXT) ########
+set sql_mode = '';
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
values
@@ -726,7 +743,6 @@ values
execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
-
######## INSERT into .. string columns values(BIGINT(n),BIGINT) ########
insert into t9
( c1, c20, c21, c22, c23, c24, c25, c26, c27, c28, c29, c30 )
@@ -803,6 +819,7 @@ values
( 57, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" ;
execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00, @arg00, @arg00,
@arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
######## INSERT into .. string columns values(LONGBLOB,NULL) ########
@@ -984,6 +1001,7 @@ delete from t9 ;
select '-- insert into date/time columns --' as test_sequence ;
--enable_query_log
######## INSERT into .. date/time columns values(VARCHAR(19),LONGTEXT) ########
+set sql_mode = '';
set @arg00= '1991-01-01 01:01:01' ;
insert into t9
( c1, c13, c14, c15, c16, c17 )
@@ -1079,6 +1097,7 @@ prepare stmt2 from "insert into t9
values
( 53, ?, ?, ?, ?, ? )" ;
execute stmt2 using @arg00, @arg00, @arg00, @arg00, @arg00 ;
+set sql_mode = default;
######## INSERT into .. date/time columns values(LONGBLOB,NULL) ########
diff --git a/mysql-test/include/ps_modify.inc b/mysql-test/include/ps_modify.inc
index f66f888261d..9dc4d453f60 100644
--- a/mysql-test/include/ps_modify.inc
+++ b/mysql-test/include/ps_modify.inc
@@ -40,7 +40,6 @@
select '------ delete tests ------' as test_sequence ;
--enable_query_log
--source include/ps_renew.inc
-
## delete without parameter
prepare stmt1 from 'delete from t1 where a=2' ;
execute stmt1;
@@ -108,7 +107,9 @@ execute stmt1 using @arg00, @arg01;
select a,b from t1 where a=@arg00;
set @arg00=NULL;
set @arg01=2;
+set sql_mode = '';
execute stmt1 using @arg00, @arg01;
+set sql_mode = default;
select a,b from t1 order by a;
set @arg00=0;
execute stmt1 using @arg01, @arg00;
diff --git a/mysql-test/include/type_hrtime.inc b/mysql-test/include/type_hrtime.inc
index 071dc7b161d..1d21a355f65 100644
--- a/mysql-test/include/type_hrtime.inc
+++ b/mysql-test/include/type_hrtime.inc
@@ -15,13 +15,15 @@ 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);
select * from t1;
--replace_regex /121000/121094/ /457000/457031/ /789000/789062/
select truncate(a, 6) from t1; # Field::val_real()
select a DIV 1 from t1; # Field::val_int()
select group_concat(distinct a) from t1; # Field::cmp()
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 engine=innodb;
+set sql_mode = default;
select * from t1 order by a;
select * from t1 order by a+0;
drop table t1;
@@ -50,7 +52,7 @@ select a, a+interval 9876543 microsecond from t1;
update t1 set a=a+interval 9876543 microsecond;
select * from t1;
select a, a + interval 2 year from t1;
-insert t1 select a + interval 2 year from t1;
+insert ignore t1 select a + interval 2 year from t1;
select * from t1;
delete from t1 where a < 20110101;
select * from t1;
@@ -77,8 +79,10 @@ show create table t3;
drop table t1, t2, t3;
# insert, alter with conversion
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
--vertical_results
eval create table t1 (f0_$type $type(0), f1_$type $type(1), f2_$type $type(2), f3_$type $type(3), f4_$type $type(4), f5_$type $type(5), f6_$type $type(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;
eval select cast(f0_$type as time(4)) time4_f0_$type, cast(f1_$type as datetime(3)) datetime3_f1_$type, cast(f2_$type as date) date_f2_$type, cast(f4_$type as double) double_f3_$type, cast(f4_$type as decimal(40,5)) decimal5_f4_$type, cast(f5_$type as signed) bigint_f5_$type, cast(f6_$type as char(255)) varchar_f6_$type from t1;
@@ -87,7 +91,9 @@ insert t2 select * from t1;
select * from t2;
eval alter table t1 change f0_$type time4_f0_$type time(4), change f1_$type datetime3_f1_$type datetime(3), change f2_$type date_f2_$type date, change f3_$type double_f3_$type double, change f4_$type decimal5_f4_$type decimal(40,5), change f5_$type bigint_f5_$type bigint, change f6_$type varchar_f6_$type varchar(255);
select * from t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval alter table t1 modify time4_f0_$type $type(0), modify datetime3_f1_$type $type(1), modify date_f2_$type $type(2), modify double_f3_$type $type(3), modify decimal5_f4_$type $type(4), modify bigint_f5_$type $type(5), modify varchar_f6_$type $type(6);
+set sql_mode = default;
select * from t1;
delete from t1;
insert t1 select * from t2;
@@ -103,7 +109,9 @@ if ($type == timestamp)
{
let attr=NOT NULL DEFAULT '0000-00-00 00:00:00.000000';
}
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval create table t1 (a $type(6)$attr, b $type(6)$attr);
+set sql_mode = default;
eval create procedure foo(x $type, y $type(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;
@@ -131,7 +139,9 @@ drop function xyz;
create view v1 as select * from t1 group by a,b;
select * from v1;
show columns from v1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from v1;
+set sql_mode = default;
show create table t2;
select * from t2;
diff --git a/mysql-test/include/type_temporal_zero_default.inc b/mysql-test/include/type_temporal_zero_default.inc
index 500d25ea18f..66b9b53937c 100644
--- a/mysql-test/include/type_temporal_zero_default.inc
+++ b/mysql-test/include/type_temporal_zero_default.inc
@@ -5,7 +5,9 @@
# Testing direct INSERT
SET sql_mode=DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t1 (a $type DEFAULT $defval);
+SET sql_mode = DEFAULT;
SET sql_mode=TRADITIONAL;
--error ER_TRUNCATED_WRONG_VALUE
eval INSERT INTO t1 VALUES ($defval);
@@ -19,9 +21,13 @@ SET sql_mode=DEFAULT;
# Testing INSERT .. SELECT
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t1 (a $type NOT NULL DEFAULT $defval, b $type NOT NULL DEFAULT $defval);
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t2 (a $type NOT NULL DEFAULT $defval);
-eval INSERT INTO t2 VALUES ($defval);
+SET sql_mode = DEFAULT;
+eval INSERT IGNORE INTO t2 VALUES ($defval);
SET sql_mode=TRADITIONAL;
--error ER_INVALID_DEFAULT_VALUE_FOR_FIELD
INSERT INTO t1 (a) SELECT a FROM t2;
@@ -31,8 +37,10 @@ SET sql_mode=DEFAULT;
# Testing LOAD
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--eval CREATE TABLE t1 (a $type DEFAULT $defval, b $type DEFAULT $defval)
--eval INSERT INTO t1 VALUES (DEFAULT,DEFAULT);
+SET sql_mode = DEFAULT;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
--eval SELECT a INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/mdev-7824.txt' FROM t1
DELETE FROM t1;
@@ -46,7 +54,9 @@ SET sql_mode=DEFAULT;
# Testing ALTER when an old field default becomes invalid
# Return an error, even if there is no STRICT_XXX_TABLES set
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--eval CREATE TABLE t1 (a $type DEFAULT $defval);
+SET sql_mode = DEFAULT;
SET sql_mode='NO_ZERO_DATE';
--error ER_INVALID_DEFAULT
ALTER TABLE t1 ADD b INT NOT NULL;
@@ -64,7 +74,7 @@ SET sql_mode=DEFAULT;
SET sql_mode=DEFAULT;
--eval CREATE TABLE t1 (a $type);
-INSERT INTO t1 VALUES (0);
+INSERT IGNORE INTO t1 VALUES (0);
SET sql_mode='TRADITIONAL';
--error ER_TRUNCATED_WRONG_VALUE
CREATE TABLE t2 AS SELECT * FROM t1;
diff --git a/mysql-test/include/world.inc b/mysql-test/include/world.inc
index eae6556c422..1e81c5c1aa7 100644
--- a/mysql-test/include/world.inc
+++ b/mysql-test/include/world.inc
@@ -4,7 +4,7 @@
# Table Country
-INSERT INTO Country VALUES
+INSERT IGNORE INTO Country VALUES
('AFG','Afghanistan',652090.00,22720000,1),
('NLD','Netherlands',41526.00,15864000,5),
('ANT','Netherlands Antilles',800.00,217000,33),
@@ -649,7 +649,7 @@ INSERT INTO City VALUES
(398,'Franco da Rocha','BRA',108964),
(399,'Teixeira de Freitas','BRA',108441),
(400,'Varginha','BRA',108314);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(401,'Ribeirão Pires','BRA',108121),
(402,'Sabará','BRA',107781),
(403,'Catanduva','BRA',107761),
@@ -1855,7 +1855,7 @@ INSERT INTO City VALUES
(1598,'Aomori','JPN',295969),
(1599,'Hakodate','JPN',294788),
(1600,'Akashi','JPN',292253);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(1601,'Yokkaichi','JPN',288173),
(1602,'Fukushima','JPN',287525),
(1603,'Morioka','JPN',287353),
@@ -2056,7 +2056,7 @@ INSERT INTO City VALUES
(1798,'Subotica','YUG',100386),
(1799,'Prizren','YUG',92303),
(1800,'Phnom Penh','KHM',570155);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(1801,'Battambang','KHM',129800),
(1802,'Siem Reap','KHM',105100),
(1803,'Douala','CMR',1448300),
@@ -2659,7 +2659,7 @@ INSERT INTO City VALUES
(2398,'Namwon','KOR',103544),
(2399,'Tonghae','KOR',95472),
(2400,'Mun-gyong','KOR',92239);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(2401,'Athenai','GRC',772072),
(2402,'Thessaloniki','GRC',383967),
(2403,'Pireus','GRC',182671),
@@ -3463,7 +3463,7 @@ INSERT INTO City VALUES
(3198,'Dakar','SEN',785071),
(3199,'Thiès','SEN',248000),
(3200,'Kaolack','SEN',199000);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(3201,'Ziguinchor','SEN',192000),
(3202,'Rufisque','SEN',150000),
(3203,'Saint-Louis','SEN',132400),
@@ -3664,7 +3664,7 @@ INSERT INTO City VALUES
(3398,'Çorlu','TUR',123300),
(3399,'Isparta','TUR',121911),
(3400,'Karabük','TUR',118285);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(3401,'Kilis','TUR',118245),
(3402,'Alanya','TUR',117300),
(3403,'Kiziltepe','TUR',112000),
@@ -3865,7 +3865,7 @@ INSERT INTO City VALUES
(3598,'Izevsk','RUS',652800),
(3599,'Krasnodar','RUS',639000),
(3600,'Jaroslavl','RUS',616700);
-INSERT INTO City VALUES
+INSERT IGNORE INTO City VALUES
(3601,'Habarovsk','RUS',609400),
(3602,'Vladivostok','RUS',606200),
(3603,'Irkutsk','RUS',593700),
@@ -4350,7 +4350,7 @@ INSERT INTO City VALUES
# Table CountryLanguage
-INSERT INTO CountryLanguage VALUES
+INSERT IGNORE INTO CountryLanguage VALUES
('AFG','Pashto',52.4),
('NLD','Dutch',95.6),
('ANT','Papiamento',86.2),
@@ -4551,7 +4551,7 @@ INSERT INTO CountryLanguage VALUES
('TJK','Tadzhik',62.2),
('TWN','Min',66.7),
('TZA','Nyamwesi',21.1);
-INSERT INTO CountryLanguage VALUES
+INSERT IGNORE INTO CountryLanguage VALUES
('DNK','Danish',93.5),
('THA','Thai',52.6),
('TGO','Ewe',23.2),
@@ -4752,7 +4752,7 @@ INSERT INTO CountryLanguage VALUES
('WSM','Samoan',47.5),
('STP','French',0.7),
('SEN','Ful',21.7);
-INSERT INTO CountryLanguage VALUES
+INSERT IGNORE INTO CountryLanguage VALUES
('SYC','English',3.8),
('SLE','Temne',31.8),
('SGP','Malay',14.1),
@@ -4953,7 +4953,7 @@ INSERT INTO CountryLanguage VALUES
('AGO','Luimbe-nganguela',5.4),
('ABW','Dutch',5.3),
('AUS','Canton Chinese',1.1);
-INSERT INTO CountryLanguage VALUES
+INSERT IGNORE INTO CountryLanguage VALUES
('AZE','Armenian',2.0),
('BGD','Garo',0.1),
('BEL','Arabic',1.6),
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 9f3a4bc48f6..cd313a7ec39 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -194,7 +194,6 @@ my @DEFAULT_SUITES= qw(
sys_vars-
unit-
vcol-
- wsrep-
);
my $opt_suites;
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('A',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 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
@@ -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'),
diff --git a/mysql-test/suite/archive/archive.result b/mysql-test/suite/archive/archive.result
index 603621abf2a..d294d3dfe58 100644
--- a/mysql-test/suite/archive/archive.result
+++ b/mysql-test/suite/archive/archive.result
@@ -12593,7 +12593,7 @@ INSERT INTO t5 VALUES (NULL, "establish justice", "to ourselves and");
INSERT INTO t5 VALUES (32, "ensure domestic tranquility", NULL);
INSERT INTO t5 VALUES (23, "provide for the common defense", "posterity");
INSERT INTO t5 VALUES (NULL, "promote the general welfare", "do ordain");
-INSERT INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain");
+INSERT IGNORE INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain");
Warnings:
Warning 1265 Data truncated for column 'b' at row 1
SELECT * FROM t5;
diff --git a/mysql-test/suite/archive/archive.test b/mysql-test/suite/archive/archive.test
index 81a73683541..30f2766507e 100644
--- a/mysql-test/suite/archive/archive.test
+++ b/mysql-test/suite/archive/archive.test
@@ -1515,7 +1515,7 @@ INSERT INTO t5 VALUES (NULL, "establish justice", "to ourselves and");
INSERT INTO t5 VALUES (32, "ensure domestic tranquility", NULL);
INSERT INTO t5 VALUES (23, "provide for the common defense", "posterity");
INSERT INTO t5 VALUES (NULL, "promote the general welfare", "do ordain");
-INSERT INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain");
+INSERT IGNORE INTO t5 VALUES (NULL, "abcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabcdeghijklmnopqrstuvwxyzabc", "do ordain");
SELECT * FROM t5;
diff --git a/mysql-test/suite/archive/mysqlhotcopy_archive.result b/mysql-test/suite/archive/mysqlhotcopy_archive.result
index bea78597336..3c74fc1e01f 100644
--- a/mysql-test/suite/archive/mysqlhotcopy_archive.result
+++ b/mysql-test/suite/archive/mysqlhotcopy_archive.result
@@ -6,13 +6,13 @@ CREATE TABLE t2 (c1 int, c2 varchar(20)) ENGINE=archive;
CREATE TABLE t3 (c1 int, c2 varchar(20)) ENGINE=archive;
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.ARZ
t1.frm
diff --git a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
index c8385e4acd8..73f7eb53bcd 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row.result
@@ -363,7 +363,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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/suite/binlog/r/binlog_mysqlbinlog_row_trans.result b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
index b09727075a1..6778dc17d75 100644
--- a/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
+++ b/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_trans.result
@@ -147,7 +147,7 @@ use `test`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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/suite/binlog/r/binlog_row_annotate.result b/mysql-test/suite/binlog/r/binlog_row_annotate.result
index bc59d6d2f42..8a37200a2e3 100644
--- a/mysql-test/suite/binlog/r/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog/r/binlog_row_annotate.result
@@ -42,35 +42,29 @@ FLUSH LOGS;
#####################################################################################
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
-master-bin.000001 # Gtid 1 # GTID 0-1-1
-master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test1
-master-bin.000001 # Gtid 1 # GTID 0-1-2
-master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test2
-master-bin.000001 # Gtid 1 # GTID 0-1-3
-master-bin.000001 # Query 1 # DROP DATABASE IF EXISTS test3
-master-bin.000001 # Gtid 1 # GTID 0-1-4
-master-bin.000001 # Query 1 # CREATE DATABASE test1
-master-bin.000001 # Gtid 1 # GTID 0-1-5
-master-bin.000001 # Query 1 # CREATE DATABASE test2
-master-bin.000001 # Gtid 1 # GTID 0-1-6
-master-bin.000001 # Query 1 # CREATE DATABASE test3
-master-bin.000001 # Gtid 1 # BEGIN GTID 0-1-7
-master-bin.000001 # Annotate_rows 1 # INSERT INTO test1.t1 VALUES (1), (2), (3)
-master-bin.000001 # Table_map 1 # table_id: # (test1.t1)
-master-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-master-bin.000001 # Gtid 1 # BEGIN GTID 0-1-8
-master-bin.000001 # Annotate_rows 1 # INSERT INTO test2.t2 VALUES (1), (2), (3)
-master-bin.000001 # Table_map 1 # table_id: # (test2.t2)
-master-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-master-bin.000001 # Gtid 1 # BEGIN GTID 0-1-9
-master-bin.000001 # Annotate_rows 1 # INSERT INTO test3.t3 VALUES (1), (2), (3)
-master-bin.000001 # Table_map 1 # table_id: # (test3.t3)
-master-bin.000001 # Write_rows_v1 1 # table_id: # flags: STMT_END_F
-master-bin.000001 # Query 1 # COMMIT
-master-bin.000001 # Gtid 1 # BEGIN GTID 0-1-10
-master-bin.000001 # Annotate_rows 1 # DELETE test1.t1, test2.t2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE test1
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE test2
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # CREATE DATABASE test3
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO test1.t1 VALUES (1), (2), (3)
+master-bin.000001 # Table_map # # table_id: # (test1.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO test2.t2 VALUES (1), (2), (3)
+master-bin.000001 # Table_map # # table_id: # (test2.t2)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO test3.t3 VALUES (1), (2), (3)
+master-bin.000001 # Table_map # # table_id: # (test3.t3)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # DELETE test1.t1, test2.t2
FROM test1.t1 INNER JOIN test2.t2 INNER JOIN test3.t3
WHERE test1.t1.a=test2.t2.a AND test2.t2.a=test3.t3.a
master-bin.000001 # Table_map # # table_id: # (test1.t1)
diff --git a/mysql-test/suite/binlog/r/binlog_row_binlog.result b/mysql-test/suite/binlog/r/binlog_row_binlog.result
index eb85c0f6310..b0f99e1368a 100644
--- a/mysql-test/suite/binlog/r/binlog_row_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_row_binlog.result
@@ -843,7 +843,7 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
+INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
@@ -894,7 +894,7 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE IF NOT EXISTS `t3` (
`a` int(11) DEFAULT NULL
) ENGINE=MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
+master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001 # Table_map # # table_id: # (mysql.user)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
index 346b7a58179..f4f9753828b 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_cp932.result
@@ -58,7 +58,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;
@@ -11499,30 +11499,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='cp932_bin';
create table t1 select repeat('a',4000) a;
@@ -11606,30 +11594,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;
create table t2 (a char(1));
insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
@@ -11649,14 +11625,14 @@ drop table t1;
drop table t2;
create table t1 (col1 varchar(1)) character set cp932;
insert into t1 values ('a');
-insert into t1 values ('ab');
+insert ignore into t1 values ('ab');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
select * from t1;
col1
a
a
-insert into t1 values ('abc');
+insert ignore into t1 values ('abc');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
select * from t1;
diff --git a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
index 023902ea453..809b886a437 100644
--- a/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result
@@ -21,7 +21,7 @@ BEGIN
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/*!*/;
@@ -91,7 +91,7 @@ use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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 utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
index 87c444004fe..6cb4e76f659 100644
--- a/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
+++ b/mysql-test/suite/binlog/r/binlog_row_mysqlbinlog_options.result
@@ -51,7 +51,7 @@ use `new_test1`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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/*!*/;
@@ -285,7 +285,7 @@ use `new_test1`/*!*/;
SET TIMESTAMP=1000000000/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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/suite/binlog/r/binlog_stm_binlog.result b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
index 421cba1ad4d..872ba40e05f 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_binlog.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_binlog.result
@@ -451,7 +451,7 @@ create table if not exists t2 select * from t1;
create temporary table tt1 (a int);
create table if not exists t3 like tt1;
USE mysql;
-INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test');
+INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test');
UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@';
DELETE FROM user WHERE host='localhost' AND user='@#@';
use test;
@@ -501,7 +501,7 @@ master-bin.000001 # Query # # use `test`; create temporary table tt1 (a int)
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; create table if not exists t3 like tt1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `mysql`; INSERT INTO user SET host='localhost', user='@#@', password=password('Just a test')
+master-bin.000001 # Query # # use `mysql`; INSERT IGNORE INTO user SET host='localhost', user='@#@', password=password('Just a test')
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `mysql`; UPDATE user SET password=password('Another password') WHERE host='localhost' AND user='@#@'
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
index 346b7a58179..f4f9753828b 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_cp932.result
@@ -58,7 +58,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;
@@ -11499,30 +11499,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='cp932_bin';
create table t1 select repeat('a',4000) a;
@@ -11606,30 +11594,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;
create table t2 (a char(1));
insert into t2 values ('0'),('1'),('2'),('3'),('4'),('5'),('6'),('7');
@@ -11649,14 +11625,14 @@ drop table t1;
drop table t2;
create table t1 (col1 varchar(1)) character set cp932;
insert into t1 values ('a');
-insert into t1 values ('ab');
+insert ignore into t1 values ('ab');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
select * from t1;
col1
a
a
-insert into t1 values ('abc');
+insert ignore into t1 values ('abc');
Warnings:
Warning 1265 Data truncated for column 'col1' at row 1
select * from t1;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
index e8ecdb7b976..cad69f6b9e1 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_ctype_ucs.result
@@ -22,7 +22,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/*!*/;
@@ -95,7 +95,7 @@ use `test`/*!*/;
SET TIMESTAMP=XXX/*!*/;
SET @@session.pseudo_thread_id=#/*!*/;
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 utf8 *//*!*/;
SET @@session.character_set_client=33,@@session.collation_connection=33,@@session.collation_server=8/*!*/;
diff --git a/mysql-test/suite/binlog/r/binlog_stm_user_variables.result b/mysql-test/suite/binlog/r/binlog_stm_user_variables.result
index 225921182e6..9923eb89a11 100644
--- a/mysql-test/suite/binlog/r/binlog_stm_user_variables.result
+++ b/mysql-test/suite/binlog/r/binlog_stm_user_variables.result
@@ -17,10 +17,10 @@ CREATE TABLE t1 (`tinyint` TINYINT,
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
### insert max unsigned
### a) declarative
-INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
+INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
TRUNCATE t1;
### b) user var
-INSERT INTO t1 VALUES (@positive,
+INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -55,13 +55,13 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # User var # # @`positive`=18446744073709551615
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -78,10 +78,10 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
master-bin.000001 # Query # # COMMIT
### insert min signed
### a) declarative
-INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
+INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
TRUNCATE t1;
### b) user var
-INSERT INTO t1 VALUES (@negative,
+INSERT IGNORE INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@@ -116,13 +116,13 @@ master-bin.000001 # Query # # use `test`; CREATE TABLE t1 (`tinyint` TINYINT,
`real` REAL(30,2),
`decimal` DECIMAL(30,2)) ENGINE = MyISAM
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # User var # # @`positive`=18446744073709551615
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -138,13 +138,13 @@ master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@positive,
@positive)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808)
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808)
master-bin.000001 # Query # # COMMIT
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # use `test`; TRUNCATE t1
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # User var # # @`negative`=-9223372036854775808
-master-bin.000001 # Query # # use `test`; INSERT INTO t1 VALUES (@negative,
+master-bin.000001 # Query # # use `test`; INSERT IGNORE INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
diff --git a/mysql-test/suite/binlog/t/binlog_stm_user_variables.test b/mysql-test/suite/binlog/t/binlog_stm_user_variables.test
index 4bed6db6269..85bf511af86 100644
--- a/mysql-test/suite/binlog/t/binlog_stm_user_variables.test
+++ b/mysql-test/suite/binlog/t/binlog_stm_user_variables.test
@@ -27,13 +27,13 @@ CREATE TABLE t1 (`tinyint` TINYINT,
-- echo ### insert max unsigned
-- echo ### a) declarative
-- disable_warnings
--- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
+-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
-- enable_warnings
TRUNCATE t1;
-- echo ### b) user var
-- disable_warnings
-INSERT INTO t1 VALUES (@positive,
+INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -57,13 +57,13 @@ INSERT INTO t1 VALUES (@positive,
-- echo ### insert min signed
-- echo ### a) declarative
-- disable_warnings
--- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
+-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
-- enable_warnings
TRUNCATE t1;
-- echo ### b) user var
-- disable_warnings
-INSERT INTO t1 VALUES (@negative,
+INSERT IGNORE INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
diff --git a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
index f4cfc86619d..e72fc9faa6e 100644
--- a/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
+++ b/mysql-test/suite/binlog_encryption/binlog_row_annotate.result
@@ -50,6 +50,7 @@ master-bin.000001 # Query # # CREATE DATABASE test2
master-bin.000001 # Gtid # # GTID #-#-#
master-bin.000001 # Query # # CREATE DATABASE test3
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # INSERT INTO test1.t1 VALUES (1), (2), (3)
master-bin.000001 # Table_map # # table_id: # (test1.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
@@ -147,6 +148,9 @@ CREATE DATABASE test3
BEGIN
/*!*/;
# at #
+# at #
+#010909 4:46:40 server id # end_log_pos # Annotate_rows:
+#Q> INSERT INTO test1.t1 VALUES (1), (2), (3)
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
@@ -368,6 +372,9 @@ CREATE DATABASE test1
BEGIN
/*!*/;
# at #
+# at #
+#010909 4:46:40 server id # end_log_pos # Annotate_rows:
+#Q> INSERT INTO test1.t1 VALUES (1), (2), (3)
#010909 4:46:40 server id # end_log_pos # Table_map: `test1`.`t1` mapped to number #
# at #
#010909 4:46:40 server id # end_log_pos # Write_rows: table id # flags: STMT_END_F
diff --git a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result
index 6719d891ee2..af36fe277a1 100644
--- a/mysql-test/suite/binlog_encryption/binlog_xa_recover.result
+++ b/mysql-test/suite/binlog_encryption/binlog_xa_recover.result
@@ -51,6 +51,7 @@ master-bin.000003 # Gtid_list # # [#-#-#]
master-bin.000003 # Binlog_checkpoint # # master-bin.000002
master-bin.000003 # Binlog_checkpoint # # master-bin.000003
master-bin.000003 # Gtid # # BEGIN GTID #-#-#
+master-bin.000003 # Annotate_rows # # INSERT INTO t1 VALUES (102, REPEAT("x", 4100))
master-bin.000003 # Table_map # # table_id: # (test.t1)
master-bin.000003 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000003 # Xid # # COMMIT /* XID */
@@ -63,6 +64,7 @@ master-bin.000004 # Gtid_list # # [#-#-#]
master-bin.000004 # Binlog_checkpoint # # master-bin.000003
master-bin.000004 # Binlog_checkpoint # # master-bin.000004
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
+master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (1, REPEAT("x", 4100))
master-bin.000004 # Table_map # # table_id: # (test.t1)
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000004 # Xid # # COMMIT /* XID */
@@ -74,10 +76,12 @@ master-bin.000005 # Start_encryption # #
master-bin.000005 # Gtid_list # # [#-#-#]
master-bin.000005 # Binlog_checkpoint # # master-bin.000004
master-bin.000005 # Gtid # # BEGIN GTID #-#-#
+master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (2, NULL)
master-bin.000005 # Table_map # # table_id: # (test.t1)
master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000005 # Xid # # COMMIT /* XID */
master-bin.000005 # Gtid # # BEGIN GTID #-#-#
+master-bin.000005 # Annotate_rows # # INSERT INTO t1 VALUES (3, REPEAT("x", 4100))
master-bin.000005 # Table_map # # table_id: # (test.t1)
master-bin.000005 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000005 # Xid # # COMMIT /* XID */
@@ -140,6 +144,7 @@ master-bin.000004 # Start_encryption # #
master-bin.000004 # Gtid_list # # [#-#-#]
master-bin.000004 # Binlog_checkpoint # # master-bin.000001
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
+master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL)
master-bin.000004 # Table_map # # table_id: # (test.t1)
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000004 # Xid # # COMMIT /* XID */
@@ -164,6 +169,7 @@ master-bin.000004 # Start_encryption # #
master-bin.000004 # Gtid_list # # [#-#-#]
master-bin.000004 # Binlog_checkpoint # # master-bin.000001
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
+master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (13, NULL)
master-bin.000004 # Table_map # # table_id: # (test.t1)
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000004 # Xid # # COMMIT /* XID */
@@ -232,6 +238,7 @@ master-bin.000004 # Gtid_list # # [#-#-#]
master-bin.000004 # Binlog_checkpoint # # master-bin.000003
master-bin.000004 # Binlog_checkpoint # # master-bin.000004
master-bin.000004 # Gtid # # BEGIN GTID #-#-#
+master-bin.000004 # Annotate_rows # # INSERT INTO t1 VALUES (24, REPEAT("x", 4100))
master-bin.000004 # Table_map # # table_id: # (test.t1)
master-bin.000004 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000004 # Xid # # COMMIT /* XID */
diff --git a/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result b/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
index a54b84227e5..8820aa23f53 100644
--- a/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
+++ b/mysql-test/suite/binlog_encryption/rpl_binlog_errors.result
@@ -88,6 +88,7 @@ DELETE FROM t2;
RESET MASTER;
###################### TEST #7
SET GLOBAL debug_dbug="+d,error_unique_log_filename";
+SET @@binlog_annotate_row_events= 0;
SELECT count(*) FROM t4;
count(*)
0
diff --git a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
index dd946ec3107..4e17669605f 100644
--- a/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
+++ b/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result
@@ -465,9 +465,11 @@ include/stop_slave.inc
connection server_1;
SET gtid_domain_id=2;
SET gtid_seq_no=1030;
+SET @@binlog_annotate_row_events= 0;
INSERT INTO t1 VALUES (17);
INSERT INTO t1 VALUES (18);
INSERT INTO t1 VALUES (19);
+SET @@binlog_annotate_row_events= 1;
connection server_2;
SET sql_slave_skip_counter= 5;
include/start_slave.inc
diff --git a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
index 6c709945111..69517dafaac 100644
--- a/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.result
@@ -21,7 +21,7 @@ binlog_format ROW
set global binlog_format=DEFAULT;
show global variables like "binlog_format%";
Variable_name Value
-binlog_format STATEMENT
+binlog_format MIXED
set global binlog_format=MIXED;
show global variables like "binlog_format%";
Variable_name Value
@@ -135,11 +135,13 @@ insert into t1 values(concat("for_23_",UUID()));
insert into t1 select "yesterday_24_";
create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
create table t3 select 1 union select UUID();
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
Warning 1292 Incorrect datetime value: '3'
insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
+SET sql_mode = DEFAULT;
create procedure foo()
begin
insert into t1 values("work_25_");
diff --git a/mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.result b/mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.result
index d61255c00a3..bef60a85e4c 100644
--- a/mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.result
+++ b/mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.result
@@ -19,6 +19,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -29,6 +30,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.result b/mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.result
index 5c518163cdd..138e4524952 100644
--- a/mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.result
+++ b/mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.result b/mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.result
index 9d086d340f4..7fa82da4618 100644
--- a/mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.result
+++ b/mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/csv/csv.result b/mysql-test/suite/csv/csv.result
index 3340b3a2d46..86ea3c306b4 100644
--- a/mysql-test/suite/csv/csv.result
+++ b/mysql-test/suite/csv/csv.result
@@ -5326,15 +5326,14 @@ select * from t1;
a
drop table t1;
create table t1(a datetime not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1;
-a
-0000-00-00 00:00:00
+ERROR HY000: Table 't1' is marked as crashed and should be repaired
drop table t1;
create table t1(a set('foo','bar') not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1;
@@ -5342,7 +5341,7 @@ a
drop table t1;
create table t1(a varchar(32) not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1;
@@ -5350,7 +5349,7 @@ a
drop table t1;
create table t1(a int not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1;
@@ -5358,7 +5357,7 @@ a
0
drop table t1;
create table t1(a blob not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select * from t1;
@@ -5366,7 +5365,7 @@ a
drop table t1;
create table t1(a bit(1) not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
Warnings:
Warning 1364 Field 'a' doesn't have a default value
select BIN(a) from t1;
@@ -5411,13 +5410,13 @@ drop table t1;
CREATE TABLE t1 (e enum('foo','bar') NOT NULL) ENGINE = CSV;
INSERT INTO t1 VALUES();
INSERT INTO t1 VALUES(default);
-INSERT INTO t1 VALUES(0);
+INSERT IGNORE INTO t1 VALUES(0);
Warnings:
Warning 1265 Data truncated for column 'e' at row 1
-INSERT INTO t1 VALUES(3);
+INSERT IGNORE INTO t1 VALUES(3);
Warnings:
Warning 1265 Data truncated for column 'e' at row 1
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(-1);
Warnings:
Warning 1265 Data truncated for column 'e' at row 1
SELECT * FROM t1;
diff --git a/mysql-test/suite/csv/csv.test b/mysql-test/suite/csv/csv.test
index 413ffdc5cfa..b8054f25b87 100644
--- a/mysql-test/suite/csv/csv.test
+++ b/mysql-test/suite/csv/csv.test
@@ -1738,27 +1738,28 @@ drop table t1;
# Bug #31473: does not work with NULL value in datetime field
#
create table t1(a datetime not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
+--error ER_CRASHED_ON_USAGE
select * from t1;
drop table t1;
create table t1(a set('foo','bar') not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
select * from t1;
drop table t1;
create table t1(a varchar(32) not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
select * from t1;
drop table t1;
create table t1(a int not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
select * from t1;
drop table t1;
create table t1(a blob not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
select * from t1;
drop table t1;
create table t1(a bit(1) not null) engine=csv;
-insert into t1 values();
+insert ignore into t1 values();
select BIN(a) from t1;
drop table t1;
# We prevent creation of table with nullable ENUM
@@ -1815,9 +1816,9 @@ drop table t1;
CREATE TABLE t1 (e enum('foo','bar') NOT NULL) ENGINE = CSV;
INSERT INTO t1 VALUES();
INSERT INTO t1 VALUES(default);
-INSERT INTO t1 VALUES(0);
-INSERT INTO t1 VALUES(3);
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(0);
+INSERT IGNORE INTO t1 VALUES(3);
+INSERT IGNORE INTO t1 VALUES(-1);
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/csv/csv_not_null.result b/mysql-test/suite/csv/csv_not_null.result
index aed9bcb1587..60e816dd3bb 100644
--- a/mysql-test/suite/csv/csv_not_null.result
+++ b/mysql-test/suite/csv/csv_not_null.result
@@ -1,3 +1,4 @@
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
# ===== csv_not_null.1 =====
DROP TABLE IF EXISTS t1, t2;
# === Will fail -- no NOT NULL ===
@@ -15,21 +16,15 @@ CREATE TABLE t1 (a int NOT NULL, b blob NOT NULL, c CHAR(20) NOT NULL,
d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL)
ENGINE = CSV;
# === should result in default for each datatype ===
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
SELECT * FROM t1;
-a b c d e f
-0 foo 0000-00-00
-INSERT INTO t1 VALUES(default,default,default,default,default,default);
+ERROR HY000: Table 't1' is marked as crashed and should be repaired
+INSERT IGNORE INTO t1 VALUES(default,default,default,default,default,default);
SELECT * FROM t1;
-a b c d e f
-0 foo 0000-00-00
-0 foo 0000-00-00
+ERROR HY000: Table 't1' is marked as crashed and should be repaired
INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31');
SELECT * FROM t1;
-a b c d e f
-0 foo 0000-00-00
-0 foo 0000-00-00
-0 abc def ghi bar 1999-12-31
+ERROR HY000: Table 't1' is marked as crashed and should be repaired
# === insert failures ===
INSERT INTO t1 VALUES(NULL,'ab','a','b','foo','2007-01-01');
ERROR 23000: Column 'a' cannot be null
@@ -40,7 +35,7 @@ DROP TABLE t1;
# ===== csv_not_null.3 =====
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
SELECT * FROM t1;
a b
0
@@ -48,7 +43,7 @@ UPDATE t1 set b = 'new_value' where a = 0;
SELECT * FROM t1;
a b
0 new_value
-UPDATE t1 set b = NULL where b = 'new_value';
+UPDATE IGNORE t1 set b = NULL where b = 'new_value';
Warnings:
Warning 1048 Column 'b' cannot be null
SELECT * FROM t1;
diff --git a/mysql-test/suite/csv/csv_not_null.test b/mysql-test/suite/csv/csv_not_null.test
index bebea53b2f7..2ddf151b05e 100644
--- a/mysql-test/suite/csv/csv_not_null.test
+++ b/mysql-test/suite/csv/csv_not_null.test
@@ -12,6 +12,8 @@
--source include/have_csv.inc
+call mtr.add_suppression("Table 't1' is marked as crashed and should be repaired");
+
#############################################################################
# Testcase csv_not_null.1: CREATE TABLE for CSV Engine requires explicit
# NOT NULL for each column
@@ -50,17 +52,20 @@ d VARCHAR(20) NOT NULL, e enum('foo','bar') NOT NULL,f DATE NOT NULL)
ENGINE = CSV;
-- echo # === should result in default for each datatype ===
-- disable_warnings
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
-- enable_warnings
+--error ER_CRASHED_ON_USAGE
SELECT * FROM t1;
-- disable_warnings
# Bug#33717 - INSERT...(default) fails for enum.
-INSERT INTO t1 VALUES(default,default,default,default,default,default);
+INSERT IGNORE INTO t1 VALUES(default,default,default,default,default,default);
-- enable_warnings
+--error ER_CRASHED_ON_USAGE
SELECT * FROM t1;
INSERT INTO t1 VALUES(0,'abc','def','ghi','bar','1999-12-31');
+--error ER_CRASHED_ON_USAGE
SELECT * FROM t1;
-- echo # === insert failures ===
--error ER_BAD_NULL_ERROR
@@ -84,14 +89,14 @@ DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (a int NOT NULL, b char(10) NOT NULL) ENGINE = CSV;
--disable_warnings
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
--enable_warnings
SELECT * FROM t1;
--disable_warnings
UPDATE t1 set b = 'new_value' where a = 0;
--enable_warnings
SELECT * FROM t1;
-UPDATE t1 set b = NULL where b = 'new_value';
+UPDATE IGNORE t1 set b = NULL where b = 'new_value';
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
index 8b96e54eefd..7cc0af43700 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_02.result
@@ -27,7 +27,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -73,6 +73,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored
procedure definition is properly applied
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1;
+SET sql_mode = '';
CREATE PROCEDURE sp1( )
begin_label: BEGIN
declare x char DEFAULT 'x';
@@ -109,6 +110,7 @@ set @v1 = x;
set @v2 = y;
SELECT '1.2', @v1, @v2;
END begin_label//
+SET sql_mode = DEFAULT;
CALL sp1();
1.1 x y
1.1 a a
@@ -713,6 +715,7 @@ DROP PROCEDURE IF EXISTS sp3;
DROP PROCEDURE IF EXISTS sp4;
DROP TABLE IF EXISTS temp;
CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET sql_mode = '' //
CREATE PROCEDURE sp0()
BEGIN
set @done=0;
@@ -752,6 +755,7 @@ set @x=0;
insert into temp values('xxx', 'yy');
set @x=1;
END//
+SET sql_mode = DEFAULT //
INSERT INTO temp VALUES('0', NULL);
CALL sp0();
Warnings:
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
index fdbe03e17fc..5f3de814d9c 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_03.result
@@ -27,7 +27,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
index 2cf079a75f8..6db6e374ca7 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_06.result
@@ -29,7 +29,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
index a520bdfac36..cf0070144dc 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_07.result
@@ -27,7 +27,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
index de63339ee95..4df88b53a56 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_08.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
index 0d846a019dd..405b7ab62b0 100644
--- a/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/innodb_storedproc_10.result
@@ -27,7 +27,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -41,7 +41,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
index 4e4716fd873..6d5ebc7a045 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_03e.result
@@ -486,8 +486,8 @@ create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_09.result b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
index e6a10592424..6664994543b 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_09.result
@@ -185,7 +185,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0
-Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
+update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
Warning 1048 Column 'f136' cannot be null
diff --git a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
index 8e9a654d4ed..f4a6d75fbc0 100644
--- a/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
+++ b/mysql-test/suite/funcs_1/r/innodb_trig_1011ext.result
@@ -163,6 +163,7 @@ Testcase 3.5.10.6: (implemented in trig_frkey.test)
Testcase 3.5.10.extra:
----------------------
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1_sp (var136 tinyint, var151 decimal) engine = <engine_to_be_used>;
create trigger trg before insert on t1_sp
for each row set @counter=@counter+1;
@@ -199,6 +200,7 @@ count(*)
drop procedure trig_sp;
drop trigger trg;
drop table t1_sp;
+set sql_mode = default;
Testcase 3.5.11.1 (implemented in trig_perf.test)
-------------------------------------------------
@@ -290,7 +292,7 @@ drop table t4;
Testcase y.y.y.4: Recursive trigger/SP references
-------------------------------------------------
-set @sql_mode='traditional';
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1_sp (
count integer,
var136 tinyint,
@@ -347,6 +349,7 @@ count(*)
drop procedure trig_sp;
drop trigger trg;
drop table t1_sp;
+set sql_mode = default;
Testcase y.y.y.5: Rollback of nested trigger references
-------------------------------------------------------
diff --git a/mysql-test/suite/funcs_1/r/is_cml_innodb.result b/mysql-test/suite/funcs_1/r/is_cml_innodb.result
index d8cd7a93664..58718fc5fae 100644
--- a/mysql-test/suite/funcs_1/r/is_cml_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_cml_innodb.result
@@ -40,6 +40,9 @@ WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH = 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -56,6 +59,9 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
2.0000 text ucs2 ucs2_general_ci
2.0000 varchar ucs2 ucs2_general_ci
2.0079 tinytext ucs2 ucs2_general_ci
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -68,6 +74,11 @@ ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
NULL char ucs2 ucs2_general_ci
NULL varchar ucs2 ucs2_general_ci
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
@@ -94,4 +105,7 @@ NULL test t1 f5 varchar 0 0 ucs2 ucs2_general_ci varchar(0)
2.0079 test t1 f9 tinytext 127 255 ucs2 ucs2_general_ci tinytext
2.0000 test t1 f10 mediumtext 8388607 16777215 ucs2 ucs2_general_ci mediumtext
2.0000 test t1 f11 longtext 2147483647 4294967295 ucs2 ucs2_general_ci longtext
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
DROP TABLE t1;
diff --git a/mysql-test/suite/funcs_1/r/is_columns.result b/mysql-test/suite/funcs_1/r/is_columns.result
index 89f29ff4b38..63c6e11f20a 100644
--- a/mysql-test/suite/funcs_1/r/is_columns.result
+++ b/mysql-test/suite/funcs_1/r/is_columns.result
@@ -430,8 +430,8 @@ TABLE_SCHEMA test
TABLE_NAME t1_my_tablex
COLUMN_NAME col2
ORDINAL_POSITION 2
-COLUMN_DEFAULT
-IS_NULLABLE NO
+COLUMN_DEFAULT NULL
+IS_NULLABLE YES
DATA_TYPE varchar
CHARACTER_MAXIMUM_LENGTH 1
CHARACTER_OCTET_LENGTH 1
diff --git a/mysql-test/suite/funcs_1/r/is_columns_innodb.result b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
index a005e39b0b4..f946930bf30 100644
--- a/mysql-test/suite/funcs_1/r/is_columns_innodb.result
+++ b/mysql-test/suite/funcs_1/r/is_columns_innodb.result
@@ -359,29 +359,9 @@ drop TABLE if exists t7, t8;
CREATE TABLE t7 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
CREATE TABLE t8 (f1 char(20),f2 char(25),f3 date,f4 int) ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' INTO TABLE t7;
-Warnings:
-Warning 1265 Data truncated for column 'f3' at row 1
-Warning 1265 Data truncated for column 'f3' at row 2
-Warning 1265 Data truncated for column 'f3' at row 3
-Warning 1265 Data truncated for column 'f3' at row 4
-Warning 1265 Data truncated for column 'f3' at row 5
-Warning 1265 Data truncated for column 'f3' at row 6
-Warning 1265 Data truncated for column 'f3' at row 7
-Warning 1265 Data truncated for column 'f3' at row 8
-Warning 1265 Data truncated for column 'f3' at row 9
-Warning 1265 Data truncated for column 'f3' at row 10
+ERROR 22007: Incorrect date value: '' for column 'f3' at row 1
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' INTO TABLE t8;
-Warnings:
-Warning 1265 Data truncated for column 'f3' at row 1
-Warning 1265 Data truncated for column 'f3' at row 2
-Warning 1265 Data truncated for column 'f3' at row 3
-Warning 1265 Data truncated for column 'f3' at row 4
-Warning 1265 Data truncated for column 'f3' at row 5
-Warning 1265 Data truncated for column 'f3' at row 6
-Warning 1265 Data truncated for column 'f3' at row 7
-Warning 1265 Data truncated for column 'f3' at row 8
-Warning 1265 Data truncated for column 'f3' at row 9
-Warning 1265 Data truncated for column 'f3' at row 10
+ERROR 22007: Incorrect date value: '' for column 'f3' at row 1
drop TABLE if exists t9;
CREATE TABLE t9 (f1 int, f2 char(25), f3 int) ENGINE = InnoDB;
LOAD DATA INFILE '<MYSQLTEST_VARDIR>/std_data/funcs_1/t9.txt' INTO TABLE t9;
@@ -743,6 +723,12 @@ COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
1.0000 text latin1 latin1_swedish_ci
1.0000 tinytext latin1 latin1_swedish_ci
1.0000 varchar latin1 latin1_swedish_ci
+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
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -753,6 +739,12 @@ WHERE table_schema LIKE 'test%'
AND CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH <> 1
ORDER BY CHARACTER_SET_NAME, COLLATION_NAME, COL_CML;
COL_CML DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME
+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
SELECT DISTINCT
CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
DATA_TYPE,
@@ -779,6 +771,17 @@ NULL year NULL NULL
NULL char latin1 latin1_bin
NULL char latin1 latin1_swedish_ci
NULL varchar latin1 latin1_swedish_ci
+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
--> CHAR(0) is allowed (see manual), and here both CHARACHTER_* values
--> are 0, which is intended behavior, and the result of 0 / 0 IS NULL
SELECT CHARACTER_OCTET_LENGTH / CHARACTER_MAXIMUM_LENGTH AS COL_CML,
@@ -1121,6 +1124,12 @@ NULL test4 t6 f3 date NULL NULL NULL NULL date
NULL test4 t6 f4 int NULL NULL NULL NULL int(11)
1.0000 test4 t6 f5 char 25 25 latin1 latin1_swedish_ci char(25)
NULL test4 t6 f6 int NULL NULL NULL NULL int(11)
+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
DROP DATABASE test1;
DROP DATABASE test4;
DROP TABLE test.t1;
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
index 0ee25154c50..2d34240274a 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_02.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -74,6 +74,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored
procedure definition is properly applied
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1;
+SET sql_mode = '';
CREATE PROCEDURE sp1( )
begin_label: BEGIN
declare x char DEFAULT 'x';
@@ -110,6 +111,7 @@ set @v1 = x;
set @v2 = y;
SELECT '1.2', @v1, @v2;
END begin_label//
+SET sql_mode = DEFAULT;
CALL sp1();
1.1 x y
1.1 a a
@@ -714,6 +716,7 @@ DROP PROCEDURE IF EXISTS sp3;
DROP PROCEDURE IF EXISTS sp4;
DROP TABLE IF EXISTS temp;
CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET sql_mode = '' //
CREATE PROCEDURE sp0()
BEGIN
set @done=0;
@@ -753,6 +756,7 @@ set @x=0;
insert into temp values('xxx', 'yy');
set @x=1;
END//
+SET sql_mode = DEFAULT //
INSERT INTO temp VALUES('0', NULL);
CALL sp0();
Warnings:
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result
index f5e40d190a6..6390cc240f9 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_03.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_03.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
index a0a48842ef8..ce1ee82e89a 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_06.result
@@ -29,7 +29,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result
index 2b8d41f963e..751986b837e 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_07.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_07.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result
index 1188eedf6c6..1b8a571e481 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_08.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_08.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
index bf4fcefb9db..0f5fe7cf34c 100644
--- a/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/memory_storedproc_10.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_03e.result b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
index f9e8fc05088..77ae3c354fe 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_03e.result
@@ -487,8 +487,8 @@ create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/memory_trig_09.result b/mysql-test/suite/funcs_1/r/memory_trig_09.result
index 5394aa01bf6..7579418dc1f 100644
--- a/mysql-test/suite/funcs_1/r/memory_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/memory_trig_09.result
@@ -186,7 +186,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0
-Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
+update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
Warning 1048 Column 'f136' cannot be null
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
index 0ee25154c50..2d34240274a 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_02.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -74,6 +74,7 @@ Ensure that the scope of each BEGIN/END compound statement within a stored
procedure definition is properly applied
--------------------------------------------------------------------------------
DROP PROCEDURE IF EXISTS sp1;
+SET sql_mode = '';
CREATE PROCEDURE sp1( )
begin_label: BEGIN
declare x char DEFAULT 'x';
@@ -110,6 +111,7 @@ set @v1 = x;
set @v2 = y;
SELECT '1.2', @v1, @v2;
END begin_label//
+SET sql_mode = DEFAULT;
CALL sp1();
1.1 x y
1.1 a a
@@ -714,6 +716,7 @@ DROP PROCEDURE IF EXISTS sp3;
DROP PROCEDURE IF EXISTS sp4;
DROP TABLE IF EXISTS temp;
CREATE TABLE temp( f1 CHAR, f2 CHAR);
+SET sql_mode = '' //
CREATE PROCEDURE sp0()
BEGIN
set @done=0;
@@ -753,6 +756,7 @@ set @x=0;
insert into temp values('xxx', 'yy');
set @x=1;
END//
+SET sql_mode = DEFAULT //
INSERT INTO temp VALUES('0', NULL);
CALL sp0();
Warnings:
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
index f5e40d190a6..6390cc240f9 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_03.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
index a0a48842ef8..ce1ee82e89a 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_06.result
@@ -29,7 +29,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -43,7 +43,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
index 2b8d41f963e..751986b837e 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_07.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
index 1188eedf6c6..1b8a571e481 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_08.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
index bf4fcefb9db..0f5fe7cf34c 100644
--- a/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
+++ b/mysql-test/suite/funcs_1/r/myisam_storedproc_10.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
index d1ab5674cb4..ad3871fab29 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_03e.result
@@ -487,8 +487,8 @@ create trigger trg1_4 before UPDATE on t1 for each row
set new.f1 = 'trig 1_4-yes';
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_3 INSERT t1 set new.f1 = 'trig 1_3-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1_4 UPDATE t1 set new.f1 = 'trig 1_4-yes' BEFORE # STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION test_yesprivs@localhost latin1 latin1_swedish_ci latin1_swedish_ci
connection no_privs;
select current_user;
current_user
diff --git a/mysql-test/suite/funcs_1/r/myisam_trig_09.result b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
index 5394aa01bf6..7579418dc1f 100644
--- a/mysql-test/suite/funcs_1/r/myisam_trig_09.result
+++ b/mysql-test/suite/funcs_1/r/myisam_trig_09.result
@@ -186,7 +186,7 @@ a NULL Test 3.5.9.4 7 999 995.240000000000000000000000000000
0 0 0 0 0 0
@tr_var_af_118 @tr_var_af_121 @tr_var_af_122 @tr_var_af_136 @tr_var_af_151 @tr_var_af_163
0 0 0 0 0 0
-Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
+update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
Warnings:
Warning 1048 Column 'f136' cannot be null
diff --git a/mysql-test/suite/funcs_1/r/storedproc.result b/mysql-test/suite/funcs_1/r/storedproc.result
index 7a27703a1ec..2c86e6c3e73 100644
--- a/mysql-test/suite/funcs_1/r/storedproc.result
+++ b/mysql-test/suite/funcs_1/r/storedproc.result
@@ -28,7 +28,7 @@ load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t4.txt' into table t6;
USE db_storedproc;
create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t7;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t7;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
@@ -42,7 +42,7 @@ Warning 1265 Data truncated for column 'f3' at row 9
Warning 1265 Data truncated for column 'f3' at row 10
create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = <engine_to_be_tested>;
-load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' into table t8;
+load data infile '<MYSQLTEST_VARDIR>/std_data/funcs_1/t7.txt' ignore into table t8;
Warnings:
Warning 1265 Data truncated for column 'f3' at row 1
Warning 1265 Data truncated for column 'f3' at row 2
diff --git a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
index c4ae93aca6b..6f23a559ce3 100644
--- a/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
+++ b/mysql-test/suite/funcs_1/storedproc/load_sp_tb.inc
@@ -70,7 +70,7 @@ create table t7 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = $engine_type;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
-load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' into table t7;
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' ignore into table t7;
--replace_result $engine_type <engine_to_be_tested>
eval
@@ -78,7 +78,7 @@ create table t8 (f1 char(20), f2 char(25), f3 date, f4 int)
engine = $engine_type;
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR>
eval
-load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' into table t8;
+load data infile '$MYSQLTEST_VARDIR/std_data/funcs_1/t7.txt' ignore into table t8;
--replace_result $engine_type <engine_to_be_tested>
eval
diff --git a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc
index 0d9548830b4..e256ee98515 100644
--- a/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc
+++ b/mysql-test/suite/funcs_1/storedproc/storedproc_02.inc
@@ -209,7 +209,7 @@ procedure definition is properly applied;
--disable_warnings
DROP PROCEDURE IF EXISTS sp1;
--enable_warnings
-
+SET sql_mode = '';
delimiter //;
CREATE PROCEDURE sp1( )
begin_label: BEGIN
@@ -248,6 +248,7 @@ begin_label: BEGIN
SELECT '1.2', @v1, @v2;
END begin_label//
delimiter ;//
+SET sql_mode = DEFAULT;
CALL sp1();
@@ -993,6 +994,7 @@ DROP TABLE IF EXISTS temp;
CREATE TABLE temp( f1 CHAR, f2 CHAR);
delimiter //;
+SET sql_mode = '' //
# 0 - without handler
CREATE PROCEDURE sp0()
BEGIN
@@ -1041,6 +1043,7 @@ BEGIN
insert into temp values('xxx', 'yy');
set @x=1;
END//
+SET sql_mode = DEFAULT //
delimiter ;//
INSERT INTO temp VALUES('0', NULL);
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_09.inc b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
index e9e6af92994..93762b363df 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_09.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_09.inc
@@ -183,7 +183,7 @@ let $message= Testcase 3.5.9.4:;
@tr_var_af_136, @tr_var_af_151, @tr_var_af_163;
--enable_query_log
- Update tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
+ update ignore tb3 Set f122='Test 3.5.9.4-trig', f136=NULL, f151=DEFAULT, f163=NULL
where f122='Test 3.5.9.4';
select f118, f121, f122, f136, f151, f163 from tb3
diff --git a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
index dd8b2a87cd8..88b04a0eefd 100644
--- a/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
+++ b/mysql-test/suite/funcs_1/triggers/triggers_1011ext.inc
@@ -144,7 +144,7 @@ let $message= Testcase 3.5.10.6: (implemented in trig_frkey.test);
# on the subject table from a stored procedure is indeed activated correctly
let $message= Testcase 3.5.10.extra:;
--source include/show_msg.inc
-
+ set sql_mode = 'NO_ENGINE_SUBSTITUTION';
--replace_result $engine_type <engine_to_be_used>
eval create table t1_sp (var136 tinyint, var151 decimal) engine = $engine_type;
@@ -184,6 +184,7 @@ let $message= Testcase 3.5.10.extra:;
drop trigger trg;
drop table t1_sp;
--enable_warnings
+ set sql_mode = default;
##################################
########## Section 3.5.11 ########
@@ -321,8 +322,7 @@ let $message= Testcase y.y.y.3: Circular trigger reference;
# Testcase: create recursive trigger/storedprocedures conditions
let $message= Testcase y.y.y.4: Recursive trigger/SP references;
--source include/show_msg.inc
-
-set @sql_mode='traditional';
+ set sql_mode = 'NO_ENGINE_SUBSTITUTION';
--replace_result $engine_type <engine_to_be_used>
eval create table t1_sp (
count integer,
@@ -375,6 +375,7 @@ set @sql_mode='traditional';
drop trigger trg;
drop table t1_sp;
--enable_warnings
+ set sql_mode = default;
# Testcase: y.y.y.5:
diff --git a/mysql-test/suite/funcs_2/include/check_charset.inc b/mysql-test/suite/funcs_2/include/check_charset.inc
index 0242d4390ac..bf2f2db610b 100644
--- a/mysql-test/suite/funcs_2/include/check_charset.inc
+++ b/mysql-test/suite/funcs_2/include/check_charset.inc
@@ -26,7 +26,7 @@ ALTER TABLE test.t1 ADD code VARCHAR(16) NOT NULL;
let $1= 221;
while ($1)
{
- eval INSERT INTO test.t1 VALUES(CHAR(254-$1), HEX(254-$1));
+ eval INSERT IGNORE INTO test.t1 VALUES(CHAR(254-$1), HEX(254-$1));
dec $1;
}
DELETE FROM test.t1 WHERE CHAR_LENGTH(a) <> 1;
diff --git a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
index bd84ace62ec..387a804d360 100644
--- a/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
+++ b/mysql-test/suite/gcol/inc/gcol_column_def_options.inc
@@ -269,11 +269,15 @@ ALTER TABLE t1 DROP PRIMARY KEY , ADD KEY idx ( col5, col2 );
DROP TABLE t1;
--echo # Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN
--echo #
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2;
+SET sql_mode = DEFAULT;
CREATE TABLE t2 (a int);
INSERT INTO t2 values(1);
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2;
+SET sql_mode = DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5;
SELECT * FROM t1;
diff --git a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
index 4b3431eea2e..7fde9c2e852 100644
--- a/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
+++ b/mysql-test/suite/gcol/inc/gcol_ins_upd.inc
@@ -47,7 +47,7 @@ delete from t1;
select * from t1;
--echo # INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
select * from t1;
delete from t1;
select * from t1;
@@ -73,7 +73,7 @@ select * from t1;
--echo # INSERT INTO tbl_name (<normal+gcols>) VALUES... a non-NULL value is specified
--echo # against gcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
select * from t1;
delete from t1;
select * from t1;
@@ -131,7 +131,7 @@ select * from t1;
--echo # UPDATE tbl_name SET gcol=expr WHERE non-gcol=expr
insert into t1 (a) values (1), (2);
select * from t1 order by a;
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
select * from t1 order by a;
delete from t1;
select * from t1;
@@ -147,7 +147,7 @@ select * from t1;
--echo # UPDATE tbl_name SET gcol=expr WHERE gcol=expr
insert into t1 (a) values (1), (2);
select * from t1 order by a;
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
select * from t1 order by a;
delete from t1;
select * from t1;
@@ -493,7 +493,7 @@ b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
-INSERT INTO t VALUES(), (), ();
+INSERT IGNORE INTO t VALUES(), (), ();
DELETE IGNORE FROM t;
@@ -512,7 +512,7 @@ CREATE TABLE t (
UNIQUE(b),
UNIQUE(b1)
);
-INSERT INTO t VALUES();
+INSERT IGNORE INTO t VALUES();
SELECT b from t;
SELECT b1 from t;
SELECT * from t;
diff --git a/mysql-test/suite/gcol/inc/gcol_keys.inc b/mysql-test/suite/gcol/inc/gcol_keys.inc
index 7f888ef54a5..44824215c40 100644
--- a/mysql-test/suite/gcol/inc/gcol_keys.inc
+++ b/mysql-test/suite/gcol/inc/gcol_keys.inc
@@ -676,7 +676,9 @@ INSERT INTO t(a) VALUES (1);
# Before index was created, this query returned the expected one match.
SELECT * FROM t WHERE c = '0';
# Adding an index sometimes crashed, other times populated it with garbage ...
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD UNIQUE INDEX (c(1));
+SET sql_mode = DEFAULT;
# ... so that this query found no match in the index.
SELECT * FROM t WHERE c = '0';
DROP TABLE t;
@@ -689,9 +691,16 @@ CREATE TABLE t (a INT, b INT, h VARCHAR(10));
INSERT INTO t VALUES (12, 3, "ss");
INSERT INTO t VALUES (13, 4, "ss");
INSERT INTO t VALUES (14, 0, "ss");
+--error ER_DIVISION_BY_ZERO
ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL;
-#--error ER_DIVISION_BY_ZERO
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL;
+SET sql_mode = DEFAULT;
+--error ER_DIVISION_BY_ZERO
+CREATE INDEX idx ON t(c);
+SET sql_mode = '';
CREATE INDEX idx ON t(c);
+set sql_mode = DEFAULT;
CALL mtr.add_suppression("\\[Warning\\] InnoDB: Compute virtual column values failed");
DROP TABLE t;
}
diff --git a/mysql-test/suite/gcol/inc/gcol_select.inc b/mysql-test/suite/gcol/inc/gcol_select.inc
index efaffd5168d..632a0cca922 100644
--- a/mysql-test/suite/gcol/inc/gcol_select.inc
+++ b/mysql-test/suite/gcol/inc/gcol_select.inc
@@ -852,15 +852,19 @@ DROP TABLE t2, t3;
--disable_abort_on_error
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(2147483647);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN b;
ALTER TABLE t1 ADD COLUMN c SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN c;
ALTER TABLE t1 ADD COLUMN d SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN d;
+SET sql_mode = DEFAULT;
ALTER TABLE t1 ADD COLUMN c INT AS(a) VIRTUAL;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE c c SMALLINT AS(a) VIRTUAL;
ALTER TABLE t1 MODIFY c TINYINT AS(a) VIRTUAL;
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1(a INT);
@@ -869,8 +873,10 @@ ALTER TABLE t1 ADD COLUMN h INT AS (a) VIRTUAL;
ALTER TABLE t1 CHANGE h i INT AS (a) VIRTUAL, ALGORITHM=COPY;
ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED;
ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUSIVE;
+SET sql_mode = DEFAULT;
--enable_abort_on_error
DROP TABLE t1;
diff --git a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
index 88268ddd6c4..957940b8c99 100644
--- a/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
+++ b/mysql-test/suite/gcol/inc/gcol_supported_sql_funcs_main.inc
@@ -937,7 +937,9 @@ let $cols = a datetime, b datetime generated always as (last_day(a)) virtual;
let $values1 = '2003-02-05',default;
let $values2 = '2003-02-32',default;
let $rows = 2;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
--source suite/gcol/inc/gcol_supported_sql_funcs.inc
+set sql_mode = DEFAULT;
--echo # MAKEDATE()
let $cols = a int, b datetime generated always as (makedate(a,1)) virtual;
@@ -1046,7 +1048,9 @@ let $rows = 1;
let $cols = a datetime, b datetime, c time generated always as (timediff(a,b)) virtual;
let $values1 = '2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default;
let $rows = 1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
--source suite/gcol/inc/gcol_supported_sql_funcs.inc
+set sql_mode = DEFAULT;
--echo # TIMESTAMP()
let $cols = a datetime, b timestamp generated always as (timestamp(a)) virtual;
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
index 37be09b221f..2e22cd89caf 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_innodb.result
@@ -354,15 +354,19 @@ ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists
DROP TABLE t1;
# Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2;
Warnings:
Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+SET sql_mode = DEFAULT;
CREATE TABLE t2 (a int);
INSERT INTO t2 values(1);
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2;
Warnings:
Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+SET sql_mode = DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5;
SELECT * FROM t1;
diff --git a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
index f6d0830ee3d..15522f94c1e 100644
--- a/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_column_def_options_myisam.result
@@ -354,15 +354,19 @@ ERROR 42000: Can't DROP INDEX `PRIMARY`; check that it exists
DROP TABLE t1;
# Bug#20949226:i CAN ASSIGN NON-DEFAULT() VALUE TO GENERATED COLUMN
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5 AS c2;
Warnings:
Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+SET sql_mode = DEFAULT;
CREATE TABLE t2 (a int);
INSERT INTO t2 values(1);
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, a AS c2 from t2;
Warnings:
Warning 1906 The value specified for generated column 'c2' in table 't1' ignored
+SET sql_mode = DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 (c1 INT, c2 INT AS (c1 * 2)) SELECT 1 AS c1, 5;
SELECT * FROM t1;
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
index 192016ba8df..3c2e4d3dd0a 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_innodb.result
@@ -23,7 +23,7 @@ delete from t1;
select * from t1;
a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
@@ -63,7 +63,7 @@ select * from t1;
a b c
# INSERT INTO tbl_name (<normal+gcols>) VALUES... a non-NULL value is specified
# against gcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
@@ -151,7 +151,7 @@ select * from t1 order by a;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1 order by a;
@@ -181,7 +181,7 @@ select * from t1 order by a;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1 order by a;
diff --git a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
index b30eb709c47..4d62a5d7a82 100644
--- a/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_ins_upd_myisam.result
@@ -23,7 +23,7 @@ delete from t1;
select * from t1;
a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against gcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
@@ -63,7 +63,7 @@ select * from t1;
a b c
# INSERT INTO tbl_name (<normal+gcols>) VALUES... a non-NULL value is specified
# against gcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
@@ -151,7 +151,7 @@ select * from t1 order by a;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1 order by a;
@@ -181,7 +181,7 @@ select * from t1 order by a;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1 order by a;
@@ -549,7 +549,7 @@ a BLOB GENERATED ALWAYS AS ('') VIRTUAL,
b TIMESTAMP(4) GENERATED ALWAYS AS ('') VIRTUAL,
KEY (a(183),b)
);
-INSERT INTO t VALUES(), (), ();
+INSERT IGNORE INTO t VALUES(), (), ();
Warnings:
Warning 1265 Data truncated for column 'b' at row 1
Warning 1265 Data truncated for column 'b' at row 2
@@ -568,7 +568,7 @@ c1 YEAR GENERATED ALWAYS AS ('aaaa') STORED,
UNIQUE(b),
UNIQUE(b1)
);
-INSERT INTO t VALUES();
+INSERT IGNORE INTO t VALUES();
SELECT b from t;
b
2000
diff --git a/mysql-test/suite/gcol/r/gcol_keys_myisam.result b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
index a331b1d2154..9da6313abce 100644
--- a/mysql-test/suite/gcol/r/gcol_keys_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_keys_myisam.result
@@ -706,9 +706,11 @@ INSERT INTO t(a) VALUES (1);
SELECT * FROM t WHERE c = '0';
a b c
1 127 0
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD UNIQUE INDEX (c(1));
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
+SET sql_mode = DEFAULT;
SELECT * FROM t WHERE c = '0';
a b c
1 127 0
@@ -722,7 +724,15 @@ INSERT INTO t VALUES (12, 3, "ss");
INSERT INTO t VALUES (13, 4, "ss");
INSERT INTO t VALUES (14, 0, "ss");
ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL;
+ERROR 22012: Division by 0
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+ALTER TABLE t ADD c INT GENERATED ALWAYS AS (a/b) VIRTUAL;
+SET sql_mode = DEFAULT;
+CREATE INDEX idx ON t(c);
+ERROR 22012: Division by 0
+SET sql_mode = '';
CREATE INDEX idx ON t(c);
+set sql_mode = DEFAULT;
CALL mtr.add_suppression("\\[Warning\\] InnoDB: Compute virtual column values failed");
DROP TABLE t;
#
diff --git a/mysql-test/suite/gcol/r/gcol_select_innodb.result b/mysql-test/suite/gcol/r/gcol_select_innodb.result
index 24daadb0d5b..61b86f55a96 100644
--- a/mysql-test/suite/gcol/r/gcol_select_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_select_innodb.result
@@ -512,19 +512,23 @@ DROP TABLE t2, t3;
#
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(2147483647);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN b;
ALTER TABLE t1 ADD COLUMN c SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN c;
ALTER TABLE t1 ADD COLUMN d SMALLINT AS (a) VIRTUAL;
ALTER TABLE t1 DROP COLUMN d;
+SET sql_mode = DEFAULT;
ALTER TABLE t1 ADD COLUMN c INT AS(a) VIRTUAL;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE c c SMALLINT AS(a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
ALTER TABLE t1 MODIFY c TINYINT AS(a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
a c
2147483647 127
@@ -537,6 +541,7 @@ ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED;
Warnings:
Warning 1264 Out of range value for column 'f' at row 1
@@ -544,6 +549,7 @@ ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUS
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
+SET sql_mode = DEFAULT;
DROP TABLE t1;
#
# Bug#21980430 GCOLS: CRASHING
diff --git a/mysql-test/suite/gcol/r/gcol_select_myisam.result b/mysql-test/suite/gcol/r/gcol_select_myisam.result
index d5e4bdabb38..374bc6915b3 100644
--- a/mysql-test/suite/gcol/r/gcol_select_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_select_myisam.result
@@ -1121,6 +1121,7 @@ DROP TABLE t2, t3;
#
CREATE TABLE t1(a INT);
INSERT INTO t1 VALUES(2147483647);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
@@ -1133,13 +1134,16 @@ ALTER TABLE t1 ADD COLUMN d SMALLINT AS (a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'd' at row 1
ALTER TABLE t1 DROP COLUMN d;
+SET sql_mode = DEFAULT;
ALTER TABLE t1 ADD COLUMN c INT AS(a) VIRTUAL;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE c c SMALLINT AS(a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
ALTER TABLE t1 MODIFY c TINYINT AS(a) VIRTUAL;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
a c
2147483647 127
@@ -1152,6 +1156,7 @@ ALTER TABLE t1 ADD COLUMN b SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
ALTER TABLE t1 ADD COLUMN e SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=NONE;
ERROR 0A000: LOCK=NONE is not supported. Reason: COPY algorithm requires a lock. Try LOCK=SHARED
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD COLUMN f SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=SHARED;
Warnings:
Warning 1264 Out of range value for column 'f' at row 1
@@ -1159,6 +1164,7 @@ ALTER TABLE t1 ADD COLUMN g SMALLINT AS (a) VIRTUAL, ALGORITHM=COPY, LOCK=EXCLUS
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
+SET sql_mode = DEFAULT;
DROP TABLE t1;
#
# Bug#21980430 GCOLS: CRASHING
diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
index 25e07e450d9..a6032c74432 100644
--- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
+++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_innodb.result
@@ -273,10 +273,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-2 NULL
2 0.693147
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG()
@@ -292,11 +296,15 @@ t1 CREATE TABLE `t1` (
insert into t1 values (2,65536,default);
insert into t1 values (10,100,default);
insert into t1 values (1,100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b c
1 100 NULL
10 100 2
2 65536 16
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
@@ -309,10 +317,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-2 NULL
2 0.693147
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG2()
@@ -326,10 +338,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
insert into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-100 NULL
65536 16
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG10()
@@ -344,11 +360,15 @@ t1 CREATE TABLE `t1` (
insert into t1 values (2,default);
insert into t1 values (100,default);
insert into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-100 NULL
100 2
2 0.30103
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# -
@@ -2254,6 +2274,7 @@ a b
drop table t1;
set sql_warnings = 0;
# LAST_DAY()
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
set sql_warnings = 1;
create table t1 (a datetime, b datetime generated always as (last_day(a)) virtual);
show create table t1;
@@ -2272,6 +2293,7 @@ a b
2003-02-05 00:00:00 2003-02-28 00:00:00
drop table t1;
set sql_warnings = 0;
+set sql_mode = DEFAULT;
# MAKEDATE()
set sql_warnings = 1;
create table t1 (a int, b datetime generated always as (makedate(a,1)) virtual);
@@ -2531,6 +2553,7 @@ a b
drop table t1;
set sql_warnings = 0;
# TIMEDIFF()
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
set sql_warnings = 1;
create table t1 (a datetime, b datetime, c time generated always as (timediff(a,b)) virtual);
show create table t1;
@@ -2546,6 +2569,7 @@ a b c
2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58
drop table t1;
set sql_warnings = 0;
+set sql_mode = DEFAULT;
# TIMESTAMP()
set sql_warnings = 1;
create table t1 (a datetime, b timestamp generated always as (timestamp(a)) virtual);
diff --git a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
index 03be01c3229..72f6d385353 100644
--- a/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
+++ b/mysql-test/suite/gcol/r/gcol_supported_sql_funcs_myisam.result
@@ -273,10 +273,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-2 NULL
2 0.693147
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG()
@@ -292,11 +296,15 @@ t1 CREATE TABLE `t1` (
insert into t1 values (2,65536,default);
insert into t1 values (10,100,default);
insert into t1 values (1,100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b c
1 100 NULL
10 100 2
2 65536 16
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
@@ -309,10 +317,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
insert into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-2 NULL
2 0.693147
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG2()
@@ -326,10 +338,14 @@ t1 CREATE TABLE `t1` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
insert into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-100 NULL
65536 16
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# LOG10()
@@ -344,11 +360,15 @@ t1 CREATE TABLE `t1` (
insert into t1 values (2,default);
insert into t1 values (100,default);
insert into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
-100 NULL
100 2
2 0.30103
+Warning 1365 Division by 0
+Warnings:
drop table t1;
set sql_warnings = 0;
# -
@@ -2254,6 +2274,7 @@ a b
drop table t1;
set sql_warnings = 0;
# LAST_DAY()
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
set sql_warnings = 1;
create table t1 (a datetime, b datetime generated always as (last_day(a)) virtual);
show create table t1;
@@ -2272,6 +2293,7 @@ a b
2003-02-05 00:00:00 2003-02-28 00:00:00
drop table t1;
set sql_warnings = 0;
+set sql_mode = DEFAULT;
# MAKEDATE()
set sql_warnings = 1;
create table t1 (a int, b datetime generated always as (makedate(a,1)) virtual);
@@ -2531,6 +2553,7 @@ a b
drop table t1;
set sql_warnings = 0;
# TIMEDIFF()
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
set sql_warnings = 1;
create table t1 (a datetime, b datetime, c time generated always as (timediff(a,b)) virtual);
show create table t1;
@@ -2546,6 +2569,7 @@ a b c
2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58
drop table t1;
set sql_warnings = 0;
+set sql_mode = DEFAULT;
# TIMESTAMP()
set sql_warnings = 1;
create table t1 (a datetime, b timestamp generated always as (timestamp(a)) virtual);
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_basic.result b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
index 06a307fc761..e0005d1be3e 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_basic.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_basic.result
@@ -927,6 +927,8 @@ INSERT INTO t VALUES (13, 4, "ss");
INSERT INTO t VALUES (14, 0, "ss");
alter table t add c INT GENERATED ALWAYS AS(a/b);
create index idx on t(c);
+Warnings:
+Warning 1365 Division by 0
DROP TABLE t;
CREATE TABLE t (
pk INTEGER AUTO_INCREMENT,
diff --git a/mysql-test/suite/gcol/r/innodb_virtual_fk.result b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
index 38a13edd8fa..3ba7b8dc260 100644
--- a/mysql-test/suite/gcol/r/innodb_virtual_fk.result
+++ b/mysql-test/suite/gcol/r/innodb_virtual_fk.result
@@ -346,6 +346,10 @@ ON UPDATE CASCADE);
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1, DEFAULT), (2, default);
UPDATE t1 SET fld1= 0 WHERE fld1= 2;
+ERROR 22012: Division by 0
+UPDATE IGNORE t1 SET fld1= 0 WHERE fld1= 2;
+Warnings:
+Warning 1365 Division by 0
SELECT fld2 FROM t2;
fld2
NULL
diff --git a/mysql-test/suite/gcol/t/innodb_virtual_fk.test b/mysql-test/suite/gcol/t/innodb_virtual_fk.test
index bd8f3664839..37a2b871a00 100644
--- a/mysql-test/suite/gcol/t/innodb_virtual_fk.test
+++ b/mysql-test/suite/gcol/t/innodb_virtual_fk.test
@@ -290,8 +290,9 @@ CREATE TABLE t2(fld1 INT NOT NULL,
ON UPDATE CASCADE);
INSERT INTO t1 VALUES(1), (2);
INSERT INTO t2 VALUES(1, DEFAULT), (2, default);
-#--error ER_DIVISION_BY_ZERO
+--error ER_DIVISION_BY_ZERO
UPDATE t1 SET fld1= 0 WHERE fld1= 2;
+UPDATE IGNORE t1 SET fld1= 0 WHERE fld1= 2;
SELECT fld2 FROM t2;
DROP TABLE t2, t1;
diff --git a/mysql-test/suite/heap/heap.result b/mysql-test/suite/heap/heap.result
index 4b88eed4bfc..79f8f656a29 100644
--- a/mysql-test/suite/heap/heap.result
+++ b/mysql-test/suite/heap/heap.result
@@ -299,9 +299,11 @@ t1 CREATE TABLE `t1` (
`c` varchar(10) DEFAULT NULL,
`t` varchar(50) DEFAULT NULL
) ENGINE=MEMORY DEFAULT CHARSET=latin1
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify t varchar(10);
Warnings:
Warning 1265 Data truncated for column 't' at row 2
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/heap/heap.test b/mysql-test/suite/heap/heap.test
index c839cc48884..0fe79174562 100644
--- a/mysql-test/suite/heap/heap.test
+++ b/mysql-test/suite/heap/heap.test
@@ -224,7 +224,9 @@ alter table t1 modify c varchar(10);
show create table t1;
alter table t1 modify v char(10);
show create table t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify t varchar(10);
+SET sql_mode = DEFAULT;
show create table t1;
select concat('*',v,'*',c,'*',t,'*') from t1;
drop table t1,t2,t3;
diff --git a/mysql-test/suite/innodb/r/data_types.result b/mysql-test/suite/innodb/r/data_types.result
index 446d37527e5..fa9a65b6a27 100644
--- a/mysql-test/suite/innodb/r/data_types.result
+++ b/mysql-test/suite/innodb/r/data_types.result
@@ -1,3 +1,4 @@
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(
t1_BIGINT BIGINT,
@@ -79,6 +80,7 @@ t1_YEAR_4 YEAR(4)
) ENGINE=InnoDB;
Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
+SET sql_mode = DEFAULT;
SELECT
name,
CASE mtype
diff --git a/mysql-test/suite/innodb/r/innodb-autoinc.result b/mysql-test/suite/innodb/r/innodb-autoinc.result
index 52c5bb6157b..522b0f45293 100644
--- a/mysql-test/suite/innodb/r/innodb-autoinc.result
+++ b/mysql-test/suite/innodb/r/innodb-autoinc.result
@@ -323,7 +323,7 @@ DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(-1);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
SELECT * FROM t1;
@@ -334,7 +334,7 @@ SHOW VARIABLES LIKE "auto_inc%";
Variable_name Value
auto_increment_increment 100
auto_increment_offset 10
-INSERT INTO t1 VALUES (-2);
+INSERT IGNORE INTO t1 VALUES (-2);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL);
@@ -378,7 +378,7 @@ DROP TABLE IF EXISTS t1;
Warnings:
Note 1051 Unknown table 'test.t1'
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(-1);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
SELECT * FROM t1;
@@ -389,7 +389,7 @@ SHOW VARIABLES LIKE "auto_inc%";
Variable_name Value
auto_increment_increment 100
auto_increment_offset 10
-INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL);
+INSERT IGNORE INTO t1 VALUES (-2),(NULL),(2),(NULL);
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (250),(NULL);
@@ -867,10 +867,8 @@ INSERT INTO t1 VALUES (NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(NULL),(N
CREATE TABLE t2(
c1 TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT
PRIMARY KEY) ENGINE=InnoDB;
-INSERT INTO t2 SELECT c1 FROM t1;
-Got one of the listed errors
INSERT INTO t2 SELECT NULL FROM t1;
-ERROR 22003: Out of range value for column 'c1' at row 1
+ERROR 22003: Out of range value for column 'c1' at row 256
DROP TABLE t1;
DROP TABLE t2;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=1, @@SESSION.AUTO_INCREMENT_OFFSET=1;
@@ -899,10 +897,10 @@ c1 c2
DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
-INSERT INTO t1 VALUES (-127, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-127, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL, NULL);
@@ -941,10 +939,10 @@ c1 c2
DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
-INSERT INTO t1 VALUES (-32757, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-32757, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL, NULL);
@@ -983,10 +981,10 @@ c1 c2
DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
-INSERT INTO t1 VALUES (-8388607, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-8388607, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL, NULL);
@@ -1025,10 +1023,10 @@ c1 c2
DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
-INSERT INTO t1 VALUES (-2147483647, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-2147483647, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL, NULL);
@@ -1067,10 +1065,10 @@ c1 c2
DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
-INSERT INTO t1 VALUES (-9223372036854775807, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-9223372036854775807, 'innodb');
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
INSERT INTO t1 VALUES (NULL, NULL);
@@ -1298,9 +1296,11 @@ t1 CREATE TABLE `t1` (
SELECT * FROM t1;
c1 c2
2147483648 a
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE c1 c1 INT default 0;
Warnings:
Warning 1264 Out of range value for column 'c1' at row 1
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/innodb/r/innodb-update-insert.result b/mysql-test/suite/innodb/r/innodb-update-insert.result
index 333618ff7be..05e8ffbc3cc 100644
--- a/mysql-test/suite/innodb/r/innodb-update-insert.result
+++ b/mysql-test/suite/innodb/r/innodb-update-insert.result
@@ -25,16 +25,18 @@ drop table t1;
#
create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
charset=utf8 engine=innodb;
+set sql_mode = '';
replace into t1 set f1=0xa3;
Warnings:
Warning 1366 Incorrect string value: '\xA3' for column 'f1' at row 1
+set sql_mode = default;
select f1 from t1;
f1
?
update t1 set f1=0x6a;
update t1 set f3=repeat(0xb1,8103);
update t1 set f1=0x4a;
-update t1 set f1=0x82;
+update ignore t1 set f1=0x82;
Warnings:
Warning 1366 Incorrect string value: '\x82' for column 'f1' at row 1
select f1 from t1;
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
index cb19c66914e..7990b93becd 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug-zip.result
@@ -457,7 +457,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-INSERT INTO test_wl5522.t1 VALUES
+INSERT IGNORE INTO test_wl5522.t1 VALUES
(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
Warnings:
Warning 1265 Data truncated for column 'c2' at row 1
diff --git a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
index 17cc1e37011..ce833bc50b2 100644
--- a/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
+++ b/mysql-test/suite/innodb/r/innodb-wl5522-debug.result
@@ -812,7 +812,7 @@ t1 CREATE TABLE `t1` (
) ENGINE=InnoDB AUTO_INCREMENT=248 DEFAULT CHARSET=latin1
DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
-INSERT INTO test_wl5522.t1 VALUES
+INSERT IGNORE INTO test_wl5522.t1 VALUES
(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
Warnings:
Warning 1265 Data truncated for column 'c2' at row 1
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index c142042fd5a..1b62854efef 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -1398,7 +1398,7 @@ CREATE TABLE t1 (col1 int(1))ENGINE=InnoDB;
CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
(stamp))ENGINE=InnoDB;
insert into t1 values (1),(2),(3);
-insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
+insert ignore into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
Warnings:
Warning 1265 Data truncated for column 'stamp' at row 3
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
diff --git a/mysql-test/suite/innodb/r/innodb_bug53592.result b/mysql-test/suite/innodb/r/innodb_bug53592.result
index ae4773de13a..2ea81a730d5 100644
--- a/mysql-test/suite/innodb/r/innodb_bug53592.result
+++ b/mysql-test/suite/innodb/r/innodb_bug53592.result
@@ -4,9 +4,11 @@ alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
create index bug53592_b on bug53592(b(81));
create unique index bug53592_c on bug53592(c(1));
+set sql_mode = '';
replace into bug53592 values (),();
Warnings:
Warning 1364 Field 'c' doesn't have a default value
+set sql_mode = default;
check table bug53592;
Table Op Msg_type Msg_text
test.bug53592 check status OK
@@ -17,9 +19,11 @@ alter table bug53592 add column b text charset utf8;
alter table bug53592 add column c blob not null;
create index bug53592_b on bug53592(b(81));
create unique index bug53592_c on bug53592(c(1));
+set sql_mode = '';
replace into bug53592 values (),();
Warnings:
Warning 1364 Field 'c' doesn't have a default value
+set sql_mode = default;
check table bug53592;
Table Op Msg_type Msg_text
test.bug53592 check status OK
diff --git a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
index 12a234a1bde..1f3b271941d 100644
--- a/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
+++ b/mysql-test/suite/innodb/r/innodb_ctype_ldml.result
@@ -101,7 +101,7 @@ DROP TABLE t1;
# Bug#43827 Server closes connections and restarts
#
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
-INSERT INTO t1 SELECT REPEAT('a',11);
+INSERT IGNORE INTO t1 SELECT REPEAT('a',11);
Warnings:
Warning 1265 Data truncated for column 'c1' at row 1
DROP TABLE t1;
diff --git a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
index 3a17d4a273b..d43da0cb7b7 100644
--- a/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
+++ b/mysql-test/suite/innodb/r/innodb_lock_wait_timeout_1.result
@@ -18,7 +18,7 @@ connection addconroot;
BEGIN;
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
-INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
+INSERT IGNORE INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result
index 72e8c30f96f..f9eef201858 100644
--- a/mysql-test/suite/innodb/r/innodb_mysql.result
+++ b/mysql-test/suite/innodb/r/innodb_mysql.result
@@ -153,6 +153,7 @@ SELECT * FROM t1;
c1 cnt
1a 2
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a1 decimal(10,0) DEFAULT NULL,
a2 blob,
@@ -163,6 +164,7 @@ a6 timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
a7 tinyblob,
INDEX idx (a6,a7(239),a5)
) ENGINE=InnoDB;
+SET sql_mode = DEFAULT;
EXPLAIN SELECT a4 FROM t1 WHERE
a6=NULL AND
a4='UNcT5pIde4I6c2SheTo4gt92OV1jgJCVkXmzyf325R1DwLURkbYHwhydANIZMbKTgdcR5xS';
@@ -581,14 +583,384 @@ INSERT INTO t1(stat_id,acct_id) VALUES
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
-INSERT INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+Warnings:
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+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
+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
+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
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+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
+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
+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
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+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
+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
+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
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+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
+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
+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
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+INSERT IGNORE INTO t1(stat_id,acct_id) SELECT stat_id, mod(id+100000, acct_id) FROM t1;
+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
+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
+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
+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
+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
+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
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
+Warning 1365 Division by 0
UPDATE t1 SET acct_id=785
WHERE MOD(stat_id,2)=0 AND MOD(id,stat_id)=MOD(acct_id,stat_id);
OPTIMIZE TABLE t1;
@@ -1174,9 +1546,11 @@ DROP PROCEDURE p1;
DROP TABLE t1;
create table t1(a text) engine=innodb default charset=utf8;
insert into t1 values('aaa');
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 add index(a(1024));
Warnings:
Warning 1071 Specified key was too long; max key length is 767 bytes
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1764,9 +2138,11 @@ t2 CREATE TABLE `t2` (
DROP TABLE t2;
DROP TABLE t1;
create table t1 (a int auto_increment primary key) engine=innodb;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 order by a;
Warnings:
Warning 1105 ORDER BY ignored as there is a user-defined clustered index in the table 't1'
+SET sql_mode = DEFAULT;
drop table t1;
CREATE TABLE t1
(vid integer NOT NULL,
diff --git a/mysql-test/suite/innodb/t/data_types.test b/mysql-test/suite/innodb/t/data_types.test
index 0978146361c..7fc67b76999 100644
--- a/mysql-test/suite/innodb/t/data_types.test
+++ b/mysql-test/suite/innodb/t/data_types.test
@@ -11,6 +11,7 @@
--source include/have_innodb.inc
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(
t1_BIGINT BIGINT,
@@ -90,6 +91,7 @@ CREATE TABLE t1
t1_YEAR_2 YEAR(2),
t1_YEAR_4 YEAR(4)
) ENGINE=InnoDB;
+SET sql_mode = DEFAULT;
SELECT
name,
diff --git a/mysql-test/suite/innodb/t/innodb-autoinc.test b/mysql-test/suite/innodb/t/innodb-autoinc.test
index dd4c4ae8603..72d681da257 100644
--- a/mysql-test/suite/innodb/t/innodb-autoinc.test
+++ b/mysql-test/suite/innodb/t/innodb-autoinc.test
@@ -217,11 +217,11 @@ SET @@INSERT_ID=1;
SHOW VARIABLES LIKE "auto_inc%";
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(-1);
SELECT * FROM t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
SHOW VARIABLES LIKE "auto_inc%";
-INSERT INTO t1 VALUES (-2);
+INSERT IGNORE INTO t1 VALUES (-2);
INSERT INTO t1 VALUES (NULL);
INSERT INTO t1 VALUES (2);
INSERT INTO t1 VALUES (NULL);
@@ -243,11 +243,11 @@ SET @@INSERT_ID=1;
SHOW VARIABLES LIKE "auto_inc%";
DROP TABLE IF EXISTS t1;
CREATE TABLE t1 (c1 INT UNSIGNED AUTO_INCREMENT, PRIMARY KEY(c1)) ENGINE=InnoDB;
-INSERT INTO t1 VALUES(-1);
+INSERT IGNORE INTO t1 VALUES(-1);
SELECT * FROM t1;
SET @@SESSION.AUTO_INCREMENT_INCREMENT=100, @@SESSION.AUTO_INCREMENT_OFFSET=10;
SHOW VARIABLES LIKE "auto_inc%";
-INSERT INTO t1 VALUES (-2),(NULL),(2),(NULL);
+INSERT IGNORE INTO t1 VALUES (-2),(NULL),(2),(NULL);
INSERT INTO t1 VALUES (250),(NULL);
SELECT * FROM t1;
INSERT INTO t1 VALUES (1000);
@@ -437,7 +437,6 @@ CREATE TABLE t2(
c1 TINYINT(3) UNSIGNED NOT NULL AUTO_INCREMENT
PRIMARY KEY) ENGINE=InnoDB;
-- error ER_DUP_ENTRY,1062
-INSERT INTO t2 SELECT c1 FROM t1;
-- error 167
INSERT INTO t2 SELECT NULL FROM t1;
DROP TABLE t1;
@@ -459,8 +458,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 TINYINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
-INSERT INTO t1 VALUES (-127, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-127, 'innodb');
INSERT INTO t1 VALUES (NULL, NULL);
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@@ -479,8 +478,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 SMALLINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
-INSERT INTO t1 VALUES (-32757, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-32757, 'innodb');
INSERT INTO t1 VALUES (NULL, NULL);
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@@ -499,8 +498,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 MEDIUMINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
-INSERT INTO t1 VALUES (-8388607, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-8388607, 'innodb');
INSERT INTO t1 VALUES (NULL, NULL);
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@@ -519,8 +518,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
-INSERT INTO t1 VALUES (-2147483647, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-2147483647, 'innodb');
INSERT INTO t1 VALUES (NULL, NULL);
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@@ -539,8 +538,8 @@ DROP TABLE t1;
CREATE TABLE t1 (c1 BIGINT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENGINE=InnoDB;
INSERT INTO t1 VALUES (1, NULL);
-INSERT INTO t1 VALUES (-1, 'innodb');
-INSERT INTO t1 VALUES (-9223372036854775807, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-1, 'innodb');
+INSERT IGNORE INTO t1 VALUES (-9223372036854775807, 'innodb');
INSERT INTO t1 VALUES (NULL, NULL);
SHOW CREATE TABLE t1;
SELECT * FROM t1;
@@ -660,7 +659,9 @@ CREATE TABLE t1 (c1 INT UNSIGNED PRIMARY KEY AUTO_INCREMENT, c2 VARCHAR(10)) ENG
INSERT INTO t1 VALUES (2147483648, 'a');
SHOW CREATE TABLE t1;
SELECT * FROM t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE c1 c1 INT default 0;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
INSERT INTO t1(c2) VALUES('b');
SELECT * FROM t1;
diff --git a/mysql-test/suite/innodb/t/innodb-update-insert.test b/mysql-test/suite/innodb/t/innodb-update-insert.test
index 95387e0564e..66d6e36c7cb 100644
--- a/mysql-test/suite/innodb/t/innodb-update-insert.test
+++ b/mysql-test/suite/innodb/t/innodb-update-insert.test
@@ -27,12 +27,14 @@ drop table t1;
create table t1 (f1 char(1), f2 longblob, f3 blob, primary key(f1))
charset=utf8 engine=innodb;
+set sql_mode = '';
replace into t1 set f1=0xa3;
+set sql_mode = default;
select f1 from t1;
update t1 set f1=0x6a;
update t1 set f3=repeat(0xb1,8103);
update t1 set f1=0x4a;
-update t1 set f1=0x82;
+update ignore t1 set f1=0x82;
select f1 from t1;
drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
index ab346c63767..0bf0d6dcd96 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug-zip.test
@@ -458,7 +458,7 @@ DROP TABLE test_wl5522.t1;
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb
ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=4;
-INSERT INTO test_wl5522.t1 VALUES
+INSERT IGNORE INTO test_wl5522.t1 VALUES
(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
diff --git a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
index d7c0212586c..25bf5385a02 100644
--- a/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
+++ b/mysql-test/suite/innodb/t/innodb-wl5522-debug.test
@@ -1208,7 +1208,7 @@ DROP TABLE test_wl5522.t1;
# a Btree that has several levels
CREATE TABLE test_wl5522.t1 (c1 INT, c2 VARCHAR(1024), c3 BLOB) ENGINE = Innodb;
-INSERT INTO test_wl5522.t1 VALUES
+INSERT IGNORE INTO test_wl5522.t1 VALUES
(100, REPEAT('Karanbir', 899), REPEAT('Ajeeth', 1200));
INSERT INTO test_wl5522.t1 SELECT * FROM test_wl5522.t1;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index e5e4b45a861..c3908abcf34 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -1143,7 +1143,7 @@ CREATE TABLE t2 (col1 int(1),stamp TIMESTAMP,INDEX stamp_idx
(stamp))ENGINE=InnoDB;
insert into t1 values (1),(2),(3);
# Note that timestamp 3 is wrong
-insert into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
+insert ignore into t2 values (1, 20020204130000),(2, 20020204130000),(4,20020204310000 ),(5,20020204230000);
SELECT col1 FROM t1 UNION SELECT col1 FROM t2 WHERE stamp <
'20020204120000' GROUP BY col1;
drop table t1,t2;
diff --git a/mysql-test/suite/innodb/t/innodb_bug53592.test b/mysql-test/suite/innodb/t/innodb_bug53592.test
index 6c0f5a8422d..3a5a22302a4 100644
--- a/mysql-test/suite/innodb/t/innodb_bug53592.test
+++ b/mysql-test/suite/innodb/t/innodb_bug53592.test
@@ -26,7 +26,9 @@ create unique index bug53592_c on bug53592(c(1));
# To get the correct index number, the code should go through index
# translation table. Otherwise, it will get the wrong index
# number and later trigger a server crash.
+set sql_mode = '';
replace into bug53592 values (),();
+set sql_mode = default;
check table bug53592;
@@ -52,7 +54,9 @@ create unique index bug53592_c on bug53592(c(1));
# To get the correct index number, the code should go through index
# translation table. Otherwise, it will get the wrong index
# number and later trigger a server crash.
+set sql_mode = '';
replace into bug53592 values (),();
+set sql_mode = default;
check table bug53592;
drop table bug53592;
diff --git a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
index 011271e4e22..26af717b15a 100644
--- a/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
+++ b/mysql-test/suite/innodb/t/innodb_ctype_ldml.test
@@ -116,7 +116,7 @@ DROP TABLE t1;
# Crash happened with a user-defined utf8 collation,
# on attempt to insert a string longer than the column can store.
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
-INSERT INTO t1 SELECT REPEAT('a',11);
+INSERT IGNORE INTO t1 SELECT REPEAT('a',11);
DROP TABLE t1;
#
diff --git a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
index 3968321d7d5..23e8b40b010 100644
--- a/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
+++ b/mysql-test/suite/innodb/t/innodb_lock_wait_timeout_1.test
@@ -28,7 +28,7 @@ BEGIN;
SELECT b FROM t2 WHERE b=7 FOR UPDATE;
--error ER_LOCK_WAIT_TIMEOUT
-INSERT INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
+INSERT IGNORE INTO t1 (a) VALUES ((SELECT a FROM t2 WHERE b=7));
--error ER_LOCK_WAIT_TIMEOUT
UPDATE t1 SET a='7000000' WHERE a=(SELECT a FROM t2 WHERE b=7);
diff --git a/mysql-test/suite/innodb_fts/r/create.result b/mysql-test/suite/innodb_fts/r/create.result
index c537aa81efd..615f0368599 100644
--- a/mysql-test/suite/innodb_fts/r/create.result
+++ b/mysql-test/suite/innodb_fts/r/create.result
@@ -16,10 +16,10 @@ INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
INSERT INTO t SET t=REPEAT('after',17);
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
# The data below is not 3-byte UTF-8, but 4-byte chars.
-INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
+INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x96\x95\xF0\x9F...' for column 't' at row 1
-INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
+INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
Warnings:
Warning 1366 Incorrect string value: '\xF0\x9F\x96\x96\xF0\x9F...' for column 't' at row 1
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST
diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
index 5f8d5e37680..adec37c930f 100644
--- a/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
+++ b/mysql-test/suite/innodb_fts/r/innodb_fts_stopword_charset.result
@@ -13,7 +13,7 @@ CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200)
) ENGINE=InnoDB;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
CREATE FULLTEXT INDEX ft_idx ON articles(title);
@@ -42,7 +42,7 @@ CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200)
) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
CREATE FULLTEXT INDEX ft_idx ON articles(title);
@@ -72,7 +72,7 @@ CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200)
) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
CREATE FULLTEXT INDEX ft_idx ON articles(title);
@@ -233,7 +233,7 @@ CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200)
) ENGINE=InnoDB;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
CREATE FULLTEXT INDEX ft_idx ON articles(title);
@@ -257,7 +257,7 @@ AGAINST ('love' IN NATURAL LANGUAGE MODE);
id title
# Shutdown and restart mysqld
SET NAMES utf8;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
SELECT * FROM articles WHERE MATCH (title)
@@ -273,7 +273,7 @@ CREATE TABLE articles (
id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY,
title VARCHAR(200)
) ENGINE=InnoDB;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
CREATE FULLTEXT INDEX ft_idx ON articles(title);
@@ -298,7 +298,7 @@ id title
DROP TABLE user_stopword;
# Shutdown and restart mysqld
SET NAMES utf8;
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
SELECT * FROM articles WHERE MATCH (title)
diff --git a/mysql-test/suite/innodb_fts/t/create.test b/mysql-test/suite/innodb_fts/t/create.test
index f0329602ed1..fe0273af750 100644
--- a/mysql-test/suite/innodb_fts/t/create.test
+++ b/mysql-test/suite/innodb_fts/t/create.test
@@ -26,8 +26,8 @@ INSERT INTO t SET t=REPEAT(_utf8 0xefbc91,84);
INSERT INTO t SET t=REPEAT('after',17); # too long, will not be indexed
INSERT INTO t SET t=REPEAT(_utf8mb3 0xe794b2e9aaa8e69687, 15);
--echo # The data below is not 3-byte UTF-8, but 4-byte chars.
-INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
-INSERT INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
+INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9695, 84);
+INSERT IGNORE INTO t SET t=REPEAT(_utf8mb4 0xf09f9696, 85);
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST
(REPEAT(CONCAT(REPEAT(_utf8mb3 0xE0B987, 4), REPEAT(_utf8mb3 0xE0B989, 5)), 5));
SELECT COUNT(*) FROM t WHERE MATCH t AGAINST ('BeforeTheIndexCreation');
diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test b/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test
index cb49ca0e39f..4974783b9be 100644
--- a/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test
+++ b/mysql-test/suite/innodb_fts/t/innodb_fts_stopword_charset.test
@@ -27,7 +27,7 @@ CREATE TABLE articles (
) ENGINE=InnoDB;
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
@@ -66,7 +66,7 @@ CREATE TABLE articles (
) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_general_ci;
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
@@ -106,7 +106,7 @@ CREATE TABLE articles (
) ENGINE=InnoDB DEFAULT CHARACTER SET latin1 COLLATE latin1_spanish_ci;
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
@@ -305,7 +305,7 @@ CREATE TABLE articles (
) ENGINE=InnoDB;
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
@@ -340,7 +340,7 @@ SET NAMES utf8;
# Insert rows to check if it uses user stopword
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
--enable_warnings
@@ -363,7 +363,7 @@ CREATE TABLE articles (
) ENGINE=InnoDB;
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
@@ -401,7 +401,7 @@ SET NAMES utf8;
# Insert rows to check if it uses user stopword
--disable_warnings
-INSERT INTO articles (title) VALUES
+INSERT IGNORE INTO articles (title) VALUES
('love'),('LOVE'),('lòve'),('LÒVE'),('löve'),('LÖVE'),('løve'),('LØVE'),
('lṓve'),('LṒVE');
--enable_warnings
diff --git a/mysql-test/suite/innodb_gis/r/1.result b/mysql-test/suite/innodb_gis/r/1.result
index 94bd5f3b2e8..0cb2b25bc4d 100644
--- a/mysql-test/suite/innodb_gis/r/1.result
+++ b/mysql-test/suite/innodb_gis/r/1.result
@@ -737,6 +737,8 @@ NULL
DROP TABLE t1;
CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
INSERT IGNORE INTO `t1` VALUES ('','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'col89' at row 1
select ST_geomfromtext(col9,col89) as a from t1;
a
NULL
@@ -787,7 +789,7 @@ drop procedure if exists fn3;
create function fn3 () returns point deterministic return ST_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 ST_GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci
select ST_astext(fn3());
diff --git a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
index 78d5f79e311..f4c6dc4bc65 100644
--- a/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
+++ b/mysql-test/suite/innodb_gis/r/alter_spatial_index.result
@@ -255,7 +255,9 @@ c1 ST_Astext(c2) ST_Astext(c4)
INSERT INTO tab SELECT * FROM tab1;
ALTER TABLE tab DROP PRIMARY KEY;
ALTER TABLE tab DROP INDEX idx2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab where c1 = c2;
+SET sql_mode = DEFAULT;
INSERT INTO temp_tab SELECT * FROM tab;
CREATE SPATIAL INDEX idx2 ON temp_tab(c2);
CREATE SPATIAL INDEX idx3 ON temp_tab(c3);
diff --git a/mysql-test/suite/innodb_gis/r/gis.result b/mysql-test/suite/innodb_gis/r/gis.result
index fed7592f42b..c27e4e116e8 100644
--- a/mysql-test/suite/innodb_gis/r/gis.result
+++ b/mysql-test/suite/innodb_gis/r/gis.result
@@ -737,6 +737,8 @@ NULL
DROP TABLE t1;
CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
INSERT IGNORE INTO `t1` VALUES ('','0000-00-00');
+Warnings:
+Warning 1264 Out of range value for column 'col89' at row 1
select ST_geomfromtext(col9,col89) as a from t1;
a
NULL
@@ -783,7 +785,7 @@ drop procedure if exists fn3;
create function fn3 () returns point deterministic return ST_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 ST_GeomFromText("point(1 1)") latin1 latin1_swedish_ci latin1_swedish_ci
select ST_astext(fn3());
diff --git a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
index efd6cb6c867..993ebbe9914 100644
--- a/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
+++ b/mysql-test/suite/innodb_gis/t/alter_spatial_index.test
@@ -303,8 +303,9 @@ ALTER TABLE tab DROP PRIMARY KEY;
ALTER TABLE tab DROP INDEX idx2;
# Check spatial index on temp tables
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TEMPORARY TABLE temp_tab AS SELECT * FROM tab where c1 = c2;
+SET sql_mode = DEFAULT;
INSERT INTO temp_tab SELECT * FROM tab;
diff --git a/mysql-test/suite/innodb_zip/r/bug52745.result b/mysql-test/suite/innodb_zip/r/bug52745.result
index 20605eb274d..3d693afc871 100644
--- a/mysql-test/suite/innodb_zip/r/bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/bug52745.result
@@ -97,6 +97,8 @@ col88=16894,
col89=6161,
col90=repeat('gale',48);
Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col49'
+Warning 1265 Data truncated for column 'col40' at row 1
Warning 1265 Data truncated for column 'col53' at row 1
Warning 1264 Out of range value for column 'col54' at row 1
Warning 1265 Data truncated for column 'col59' at row 1
@@ -112,6 +114,8 @@ Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
SHOW WARNINGS;
Level Code Message
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col49'
+Warning 1265 Data truncated for column 'col40' at row 1
Warning 1265 Data truncated for column 'col53' at row 1
Warning 1264 Out of range value for column 'col54' at row 1
Warning 1265 Data truncated for column 'col59' at row 1
diff --git a/mysql-test/suite/innodb_zip/r/index_large_prefix.result b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
index f7591462803..4e57b27dec8 100644
--- a/mysql-test/suite/innodb_zip/r/index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/index_large_prefix.result
@@ -101,7 +101,7 @@ create index idx1 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
Level Code Message
-Warning 1071 Specified key was too long; max key length is 767 bytes
+Error 1071 Specified key was too long; max key length is 767 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
set global innodb_large_prefix=1;
Warnings:
@@ -110,7 +110,7 @@ create index idx2 on worklog5743_1(a2(4000));
Got one of the listed errors
show warnings;
Level Code Message
-Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1071 Specified key was too long; max key length is 3072 bytes
Error 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
create index idx3 on worklog5743_1(a2(436));
ERROR 42000: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
@@ -419,7 +419,7 @@ create index idx4 on worklog5743(a1, a2);
ERROR 42000: Specified key was too long; max key length is 3072 bytes
show warnings;
Level Code Message
-Warning 1071 Specified key was too long; max key length is 3072 bytes
+Error 1071 Specified key was too long; max key length is 3072 bytes
Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx5 on worklog5743(a1, a5);
ERROR 42000: Specified key was too long; max key length is 3072 bytes
diff --git a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
index 5ba26753ea6..753704ff70f 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_bug52745.result
@@ -2,6 +2,7 @@ SET GLOBAL innodb_file_format='Barracuda';
Warnings:
Warning 131 Using innodb_file_format is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
SET GLOBAL innodb_file_per_table=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
@@ -63,7 +64,8 @@ Warnings:
Note 1287 'YEAR(2)' is deprecated and will be removed in a future release. Please use YEAR(4) instead
Note 1291 Column 'col82' has duplicated value '' in ENUM
Note 1291 Column 'col82' has duplicated value '' in ENUM
-INSERT INTO bug52745 SET
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO bug52745 SET
col40='0000-00-00 00:00:00',
col51=16547,
col53='7711484',
@@ -99,6 +101,8 @@ col88=16894,
col89=6161,
col90=repeat('gale',48);
Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col49'
+Warning 1265 Data truncated for column 'col40' at row 1
Warning 1265 Data truncated for column 'col53' at row 1
Warning 1264 Out of range value for column 'col54' at row 1
Warning 1265 Data truncated for column 'col59' at row 1
@@ -114,6 +118,8 @@ Warning 1265 Data truncated for column 'col79' at row 1
Warning 1264 Out of range value for column 'col84' at row 1
SHOW WARNINGS;
Level Code Message
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col49'
+Warning 1265 Data truncated for column 'col40' at row 1
Warning 1265 Data truncated for column 'col53' at row 1
Warning 1264 Out of range value for column 'col54' at row 1
Warning 1265 Data truncated for column 'col59' at row 1
diff --git a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
index d44c7e33fe3..5a609d818a0 100644
--- a/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
+++ b/mysql-test/suite/innodb_zip/r/innodb_index_large_prefix.result
@@ -102,6 +102,7 @@ create table worklog5743_2(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=2;
create table worklog5743_4(a1 int, a2 TEXT not null) KEY_BLOCK_SIZE=4;
create table worklog5743_8(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=8;
create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
+set sql_mode='';
set global innodb_large_prefix=0;
Warnings:
Warning 131 Using innodb_large_prefix is deprecated and the parameter may be removed in future releases. See http://dev.mysql.com/doc/refman/5.7/en/innodb-file-format.html
@@ -284,6 +285,7 @@ Error 1071 Specified key was too long; max key length is 3072 bytes
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
show warnings;
Level Code Message
+set sql_mode=default;
insert into worklog5743_1 values(9, repeat("a", 10000));
insert into worklog5743_2 values(9, repeat("a", 10000));
insert into worklog5743_4 values(9, repeat("a", 10000));
@@ -410,6 +412,7 @@ a4 varchar(3072),
a5 varchar(3069),
a6 varchar(3068))
ROW_FORMAT=DYNAMIC;
+set sql_mode='';
create index idx1 on worklog5743(a2);
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
@@ -447,6 +450,7 @@ worklog5743 CREATE TABLE `worklog5743` (
KEY `idx3` (`a4`),
KEY `idx6` (`a1`,`a6`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=DYNAMIC
+set sql_mode=default;
insert into worklog5743 values(9,
repeat("a", 20000), repeat("a", 3073),
repeat("a", 3072), repeat("a", 3069),
@@ -505,9 +509,11 @@ rollback;
drop table worklog5743;
### Test 7 ###
create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
+set sql_mode='';
create index idx1 on worklog5743(a(3073));
Warnings:
Warning 1071 Specified key was too long; max key length is 3072 bytes
+set sql_mode=default;
create index idx2 on worklog5743(a(3072));
Warnings:
Note 1831 Duplicate index `idx2`. This is deprecated and will be disallowed in a future release
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
index 1d82b95a602..0c4d4c6b228 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36169.test
@@ -26,6 +26,7 @@ SET GLOBAL innodb_file_per_table=ON;
# Creating a table with 94 columns and 24 indexes
DROP TABLE IF EXISTS `table0`;
set innodb_strict_mode=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--error ER_TOO_BIG_ROWSIZE
CREATE TABLE IF NOT EXISTS `table0`
(`col0` BOOL,
@@ -147,6 +148,7 @@ KEY `idx21` (`col83`(54)),
KEY `idx22` (`col51`,`col7`(120)),
KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`)
)engine=innodb ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET sql_mode = DEFAULT;
# Creating a table with 10 columns and 32 indexes
DROP TABLE IF EXISTS `table1`;
@@ -294,7 +296,7 @@ CREATE TABLE IF NOT EXISTS `table2`
`col91` TINYINT,
`col92` ENUM ('test1','test2','test3'),
`col93` BOOL,
-`col94` TIMESTAMP,
+`col94` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col95` BOOL,
`col96` MEDIUMTEXT,
`col97` DECIMAL,
@@ -307,22 +309,22 @@ CREATE TABLE IF NOT EXISTS `table2`
`col104` MEDIUMINT,
`col105` DECIMAL,
`col106` NUMERIC,
-`col107` TIMESTAMP,
+`col107` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col108` MEDIUMBLOB,
`col109` TINYBLOB,
`col110` SET ('test1','test2','test3'),
`col111` YEAR,
-`col112` TIMESTAMP,
+`col112` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col113` CHAR (201),
`col114` BOOL,
`col115` TINYINT,
`col116` DOUBLE,
`col117` TINYINT,
-`col118` TIMESTAMP,
+`col118` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col119` SET ('test1','test2','test3'),
`col120` SMALLINT,
`col121` TINYBLOB,
-`col122` TIMESTAMP,
+`col122` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col123` BLOB,
`col124` DATE,
`col125` SMALLINT,
@@ -546,7 +548,7 @@ CREATE TABLE IF NOT EXISTS `table3`
`col178` MEDIUMINT,
`col179` TINYBLOB,
`col180` FLOAT,
-`col181` TIMESTAMP,
+`col181` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col182` REAL,
`col183` DOUBLE PRECISION,
`col184` BIGINT,
@@ -701,7 +703,7 @@ CREATE TABLE IF NOT EXISTS `table4`
`col127` TINYTEXT,
`col128` BOOL,
`col129` NUMERIC,
-`col130` TIMESTAMP,
+`col130` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col131` INT,
`col132` MEDIUMBLOB,
KEY `idx0` (`col130`),
@@ -820,8 +822,8 @@ CREATE TABLE IF NOT EXISTS `table5`
`col91` FLOAT,
`col92` DATETIME,
`col93` TINYTEXT,
-`col94` TIMESTAMP,
-`col95` TIMESTAMP,
+`col94` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+`col95` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col96` TEXT,
`col97` REAL,
`col98` VARCHAR (198),
@@ -832,7 +834,7 @@ CREATE TABLE IF NOT EXISTS `table5`
`col103` LONGBLOB,
`col104` MEDIUMINT,
`col105` MEDIUMTEXT,
-`col106` TIMESTAMP,
+`col106` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col107` SMALLINT,
`col108` NUMERIC,
`col109` DECIMAL,
@@ -891,7 +893,7 @@ CREATE TABLE IF NOT EXISTS `table5`
`col162` DOUBLE PRECISION,
`col163` BLOB,
`col164` ENUM ('test1','test2','test3'),
-`col165` TIMESTAMP,
+`col165` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col166` DATE,
`col167` TINYBLOB,
`col168` TINYBLOB,
@@ -936,7 +938,7 @@ CREATE TABLE IF NOT EXISTS `table6`
`col11` DOUBLE,
`col12` DOUBLE,
`col13` SMALLINT,
-`col14` TIMESTAMP,
+`col14` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col15` DECIMAL,
`col16` DATE,
`col17` TEXT,
@@ -958,7 +960,7 @@ CREATE TABLE IF NOT EXISTS `table6`
`col33` FLOAT,
`col34` TEXT,
`col35` DATE,
-`col36` TIMESTAMP,
+`col36` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col37` REAL,
`col38` BLOB,
`col39` BLOB,
@@ -968,7 +970,7 @@ CREATE TABLE IF NOT EXISTS `table6`
`col43` TINYINT,
`col44` REAL,
`col45` BIGINT,
-`col46` TIMESTAMP,
+`col46` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col47` BLOB,
`col48` ENUM ('test1','test2','test3'),
`col49` BOOL,
@@ -1051,7 +1053,7 @@ CREATE TABLE IF NOT EXISTS `table6`
`col126` BLOB,
`col127` REAL,
`col128` MEDIUMBLOB,
-`col129` TIMESTAMP,
+`col129` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`col130` LONGBLOB,
`col131` MEDIUMBLOB,
`col132` YEAR,
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
index 015f461e532..f649f8d521f 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug36172.test
@@ -20,7 +20,9 @@ SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on;
DROP TABLE IF EXISTS `table0`;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `table0` ( `col0` tinyint(1) DEFAULT NULL, `col1` tinyint(1) DEFAULT NULL, `col2` tinyint(4) DEFAULT NULL, `col3` date DEFAULT NULL, `col4` time DEFAULT NULL, `col5` set('test1','test2','test3') DEFAULT NULL, `col6` time DEFAULT NULL, `col7` text, `col8` decimal(10,0) DEFAULT NULL, `col9` set('test1','test2','test3') DEFAULT NULL, `col10` float DEFAULT NULL, `col11` double DEFAULT NULL, `col12` enum('test1','test2','test3') DEFAULT NULL, `col13` tinyblob, `col14` year(4) DEFAULT NULL, `col15` set('test1','test2','test3') DEFAULT NULL, `col16` decimal(10,0) DEFAULT NULL, `col17` decimal(10,0) DEFAULT NULL, `col18` blob, `col19` datetime DEFAULT NULL, `col20` double DEFAULT NULL, `col21` decimal(10,0) DEFAULT NULL, `col22` datetime DEFAULT NULL, `col23` decimal(10,0) DEFAULT NULL, `col24` decimal(10,0) DEFAULT NULL, `col25` longtext, `col26` tinyblob, `col27` time DEFAULT NULL, `col28` tinyblob, `col29` enum('test1','test2','test3') DEFAULT NULL, `col30` smallint(6) DEFAULT NULL, `col31` double DEFAULT NULL, `col32` float DEFAULT NULL, `col33` char(175) DEFAULT NULL, `col34` tinytext, `col35` tinytext, `col36` tinyblob, `col37` tinyblob, `col38` tinytext, `col39` mediumblob, `col40` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `col41` double DEFAULT NULL, `col42` smallint(6) DEFAULT NULL, `col43` longblob, `col44` varchar(80) DEFAULT NULL, `col45` mediumtext, `col46` decimal(10,0) DEFAULT NULL, `col47` bigint(20) DEFAULT NULL, `col48` date DEFAULT NULL, `col49` tinyblob, `col50` date DEFAULT NULL, `col51` tinyint(1) DEFAULT NULL, `col52` mediumint(9) DEFAULT NULL, `col53` float DEFAULT NULL, `col54` tinyblob, `col55` longtext, `col56` smallint(6) DEFAULT NULL, `col57` enum('test1','test2','test3') DEFAULT NULL, `col58` datetime DEFAULT NULL, `col59` mediumtext, `col60` varchar(232) DEFAULT NULL, `col61` decimal(10,0) DEFAULT NULL, `col62` year(4) DEFAULT NULL, `col63` smallint(6) DEFAULT NULL, `col64` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col65` blob, `col66` longblob, `col67` int(11) DEFAULT NULL, `col68` longtext, `col69` enum('test1','test2','test3') DEFAULT NULL, `col70` int(11) DEFAULT NULL, `col71` time DEFAULT NULL, `col72` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col73` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00', `col74` varchar(170) DEFAULT NULL, `col75` set('test1','test2','test3') DEFAULT NULL, `col76` tinyblob, `col77` bigint(20) DEFAULT NULL, `col78` decimal(10,0) DEFAULT NULL, `col79` datetime DEFAULT NULL, `col80` year(4) DEFAULT NULL, `col81` decimal(10,0) DEFAULT NULL, `col82` longblob, `col83` text, `col84` char(83) DEFAULT NULL, `col85` decimal(10,0) DEFAULT NULL, `col86` float DEFAULT NULL, `col87` int(11) DEFAULT NULL, `col88` varchar(145) DEFAULT NULL, `col89` date DEFAULT NULL, `col90` decimal(10,0) DEFAULT NULL, `col91` decimal(10,0) DEFAULT NULL, `col92` mediumblob, `col93` time DEFAULT NULL, KEY `idx0` (`col69`,`col90`,`col8`), KEY `idx1` (`col60`), KEY `idx2` (`col60`,`col70`,`col74`), KEY `idx3` (`col22`,`col32`,`col72`,`col30`), KEY `idx4` (`col29`), KEY `idx5` (`col19`,`col45`(143)), KEY `idx6` (`col46`,`col48`,`col5`,`col39`(118)), KEY `idx7` (`col48`,`col61`), KEY `idx8` (`col93`), KEY `idx9` (`col31`), KEY `idx10` (`col30`,`col21`), KEY `idx11` (`col67`), KEY `idx12` (`col44`,`col6`,`col8`,`col38`(226)), KEY `idx13` (`col71`,`col41`,`col15`,`col49`(88)), KEY `idx14` (`col78`), KEY `idx15` (`col63`,`col67`,`col64`), KEY `idx16` (`col17`,`col86`), KEY `idx17` (`col77`,`col56`,`col10`,`col55`(24)), KEY `idx18` (`col62`), KEY `idx19` (`col31`,`col57`,`col56`,`col53`), KEY `idx20` (`col46`), KEY `idx21` (`col83`(54)), KEY `idx22` (`col51`,`col7`(120)), KEY `idx23` (`col7`(163),`col31`,`col71`,`col14`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2;
+SET sql_mode = DEFAULT;
insert ignore into `table0` set `col23` = 7887371.5084383683, `col24` = 4293854615.6906948000, `col25` = 'vitalist', `col26` = 'widespread', `col27` = '3570490', `col28` = 'habitual', `col30` = -5471, `col31` = 4286985783.6771750000, `col32` = 6354540.9826654866, `col33` = 'defoliation', `col34` = 'logarithms', `col35` = 'tegument\'s', `col36` = 'scouting\'s', `col37` = 'intermittency', `col38` = 'elongates', `col39` = 'prophecies', `col40` = '20560103035939', `col41` = 4292809130.0544143000, `col42` = 22057, `col43` = 'Hess\'s', `col44` = 'bandstand', `col45` = 'phenylketonuria', `col46` = 6338767.4018677324, `col47` = 5310247, `col48` = '12592418', `col49` = 'churchman\'s', `col50` = '32226125', `col51` = -58, `col52` = -6207968, `col53` = 1244839.3255104220, `col54` = 'robotized', `col55` = 'monotonous', `col56` = -26909, `col58` = '20720107023550', `col59` = 'suggestiveness\'s', `col60` = 'gemology', `col61` = 4287800670.2229986000, `col62` = '1944', `col63` = -16827, `col64` = '20700107212324', `col65` = 'Nicolais', `col66` = 'apteryx', `col67` = 6935317, `col68` = 'stroganoff', `col70` = 3316430, `col71` = '3277608', `col72` = '19300511045918', `col73` = '20421201003327', `col74` = 'attenuant', `col75` = '15173', `col76` = 'upstroke\'s', `col77` = 8118987, `col78` = 6791516.2735374002, `col79` = '20780701144624', `col80` = '2134', `col81` = 4290682351.3127537000, `col82` = 'unexplainably', `col83` = 'Storm', `col84` = 'Greyso\'s', `col85` = 4289119212.4306774000, `col86` = 7617575.8796655172, `col87` = -6325335, `col88` = 'fondue\'s', `col89` = '40608940', `col90` = 1659421.8093508712, `col91` = 8346904.6584368423, `col92` = 'reloads', `col93` = '5188366';
CHECK TABLE table0 EXTENDED;
INSERT IGNORE INTO `table0` SET `col19` = '19940127002709', `col20` = 2383927.9055146948, `col21` = 4293243420.5621204000, `col22` = '20511211123705', `col23` = 4289899778.6573381000, `col24` = 4293449279.0540481000, `col25` = 'emphysemic', `col26` = 'dentally', `col27` = '2347406', `col28` = 'eruct', `col30` = 1222, `col31` = 4294372994.9941406000, `col32` = 4291385574.1173744000, `col33` = 'borrowing\'s', `col34` = 'septics', `col35` = 'ratter\'s', `col36` = 'Kaye', `col37` = 'Florentia', `col38` = 'allium', `col39` = 'barkeep', `col40` = '19510407003441', `col41` = 4293559200.4215522000, `col42` = 22482, `col43` = 'decussate', `col44` = 'Brom\'s', `col45` = 'violated', `col46` = 4925506.4635456400, `col47` = 930549, `col48` = '51296066', `col49` = 'voluminously', `col50` = '29306676', `col51` = -88, `col52` = -2153690, `col53` = 4290250202.1464887000, `col54` = 'expropriation', `col55` = 'Aberdeen\'s', `col56` = 20343, `col58` = '19640415171532', `col59` = 'extern', `col60` = 'Ubana', `col61` = 4290487961.8539081000, `col62` = '2147', `col63` = -24271, `col64` = '20750801194548', `col65` = 'Cunaxa\'s', `col66` = 'pasticcio', `col67` = 2795817, `col68` = 'Indore\'s', `col70` = 6864127, `col71` = '1817832', `col72` = '20540506114211', `col73` = '20040101012300', `col74` = 'rationalized', `col75` = '45522', `col76` = 'indene', `col77` = -6964559, `col78` = 4247535.5266884370, `col79` = '20720416124357', `col80` = '2143', `col81` = 4292060102.4466386000, `col82` = 'striving', `col83` = 'boneblack\'s', `col84` = 'redolent', `col85` = 6489697.9009369183, `col86` = 4287473465.9731131000, `col87` = 7726015, `col88` = 'perplexed', `col89` = '17153791', `col90` = 5478587.1108127078, `col91` = 4287091404.7004304000, `col92` = 'Boulez\'s', `col93` = '2931278';
diff --git a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
index 3c5d79826f0..b210afc7d1f 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_bug52745.test
@@ -5,6 +5,7 @@ let $file_per_table=`select @@innodb_file_per_table`;
SET GLOBAL innodb_file_format='Barracuda';
SET GLOBAL innodb_file_per_table=on;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE bug52745 (
a2 int(10) unsigned DEFAULT NULL,
col37 time DEFAULT NULL,
@@ -62,8 +63,9 @@ CREATE TABLE bug52745 (
col89 float unsigned zerofill DEFAULT NULL,
col90 tinyblob
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=1;
+SET sql_mode = DEFAULT;
-INSERT INTO bug52745 SET
+INSERT IGNORE INTO bug52745 SET
col40='0000-00-00 00:00:00',
col51=16547,
col53='7711484',
diff --git a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
index 8af2bc7ffc7..93beea6c80f 100644
--- a/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
+++ b/mysql-test/suite/innodb_zip/t/innodb_index_large_prefix.test
@@ -140,6 +140,7 @@ create table worklog5743_16(a1 int, a2 TEXT, a3 TEXT) KEY_BLOCK_SIZE=16;
# See page_zip_empty_size() and Bug #47495 for more detail.
# Test edge cases for indexes using key_block_size=1
+set sql_mode='';
set global innodb_large_prefix=0;
-- error ER_TOO_BIG_ROWSIZE
create index idx1 on worklog5743_1(a2(4000));
@@ -242,6 +243,7 @@ create index idx6 on worklog5743_16(a1, a2(2000), a3(1069));
show warnings;
create index idx7 on worklog5743_16(a1, a2(2000), a3(1068));
show warnings;
+set sql_mode=default;
# Insert a large record into each of these tables.
insert into worklog5743_1 values(9, repeat("a", 10000));
@@ -325,6 +327,7 @@ create table worklog5743(a1 int,
a5 varchar(3069),
a6 varchar(3068))
ROW_FORMAT=DYNAMIC;
+set sql_mode='';
create index idx1 on worklog5743(a2);
create index idx2 on worklog5743(a3);
create index idx3 on worklog5743(a4);
@@ -338,6 +341,7 @@ show warnings;
create index idx6 on worklog5743(a1, a6);
show warnings;
show create table worklog5743;
+set sql_mode=default;
insert into worklog5743 values(9,
repeat("a", 20000), repeat("a", 3073),
@@ -409,7 +413,9 @@ create table worklog5743(a TEXT not null) ROW_FORMAT=DYNAMIC;
# Length exceeds maximum supported key length
# It will be auto-truncated to 3072
+set sql_mode='';
create index idx1 on worklog5743(a(3073));
+set sql_mode=default;
create index idx2 on worklog5743(a(3072));
show create table worklog5743;
drop table worklog5743;
diff --git a/mysql-test/suite/maria/icp.result b/mysql-test/suite/maria/icp.result
index 64ae4f5e057..e9efc28ba5d 100644
--- a/mysql-test/suite/maria/icp.result
+++ b/mysql-test/suite/maria/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/suite/maria/maria-gis-rtree-dynamic.result b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
index 024b929646a..a0535026722 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.result
@@ -801,7 +801,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)) row_format=dynamic;
-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`)) row_format=dynamic DEFAULT CHARSET=latin1;
@@ -1463,7 +1463,7 @@ drop table t1;
CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) row_format=dynamic;
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/suite/maria/maria-gis-rtree-dynamic.test b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
index 668d393d0b8..473f787db53 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-dynamic.test
@@ -173,7 +173,7 @@ CREATE TABLE t1 (st varchar(100));
INSERT INTO t1 VALUES ("Fake string");
CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) row_format=dynamic;
--error 1416
-INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
+INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) row_format=dynamic DEFAULT CHARSET=latin1;
@@ -849,7 +849,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) row_format=dynamic;
--error 1048
INSERT INTO t1(foo) VALUES (NULL);
--error 1416
-INSERT INTO t1() VALUES ();
+INSERT IGNORE INTO t1() VALUES ();
--error 1416
INSERT INTO t1(foo) VALUES ('');
DROP TABLE t1;
diff --git a/mysql-test/suite/maria/maria-gis-rtree-trans.result b/mysql-test/suite/maria/maria-gis-rtree-trans.result
index 2b94bc0ffad..dbcbdeb1661 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.result
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.result
@@ -801,7 +801,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)) transactional=1 row_format=page;
-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`)) transactional=1 row_format=page DEFAULT CHARSET=latin1;
@@ -1454,7 +1454,7 @@ drop table t1;
CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=1 row_format=page;
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/suite/maria/maria-gis-rtree-trans.test b/mysql-test/suite/maria/maria-gis-rtree-trans.test
index 73f129d8df9..84678b68693 100644
--- a/mysql-test/suite/maria/maria-gis-rtree-trans.test
+++ b/mysql-test/suite/maria/maria-gis-rtree-trans.test
@@ -176,7 +176,7 @@ CREATE TABLE t1 (st varchar(100));
INSERT INTO t1 VALUES ("Fake string");
CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=1 row_format=page;
--error 1416
-INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
+INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=1 row_format=page DEFAULT CHARSET=latin1;
@@ -849,7 +849,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=1 row_
--error 1048
INSERT INTO t1(foo) VALUES (NULL);
--error 1416
-INSERT INTO t1() VALUES ();
+INSERT IGNORE INTO t1() VALUES ();
--error 1416
INSERT INTO t1(foo) VALUES ('');
DROP TABLE t1;
diff --git a/mysql-test/suite/maria/maria-gis-rtree.result b/mysql-test/suite/maria/maria-gis-rtree.result
index 826aee5fbc2..3ecdcc64928 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.result
+++ b/mysql-test/suite/maria/maria-gis-rtree.result
@@ -801,7 +801,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)) transactional=0 row_format=page;
-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`)) transactional=0 row_format=page DEFAULT CHARSET=latin1;
@@ -1454,7 +1454,7 @@ drop table t1;
CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=0 row_format=page;
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/suite/maria/maria-gis-rtree.test b/mysql-test/suite/maria/maria-gis-rtree.test
index a3845adb7b9..5c68e570fca 100644
--- a/mysql-test/suite/maria/maria-gis-rtree.test
+++ b/mysql-test/suite/maria/maria-gis-rtree.test
@@ -173,7 +173,7 @@ CREATE TABLE t1 (st varchar(100));
INSERT INTO t1 VALUES ("Fake string");
CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom)) transactional=0 row_format=page;
--error 1416
-INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
+INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) transactional=0 row_format=page DEFAULT CHARSET=latin1;
@@ -846,7 +846,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) ) transactional=0 row_
--error 1048
INSERT INTO t1(foo) VALUES (NULL);
--error 1416
-INSERT INTO t1() VALUES ();
+INSERT IGNORE INTO t1() VALUES ();
--error 1416
INSERT INTO t1(foo) VALUES ('');
DROP TABLE t1;
diff --git a/mysql-test/suite/maria/maria-ucs2.result b/mysql-test/suite/maria/maria-ucs2.result
index fab640f703a..0b3d6eb0c4a 100644
--- a/mysql-test/suite/maria/maria-ucs2.result
+++ b/mysql-test/suite/maria/maria-ucs2.result
@@ -15,8 +15,12 @@ CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
+ERROR 42000: Specified key was too long; max key length is 1000 bytes
+SET sql_mode='NO_ENGINE_SUBSTITUTION';
+ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
Warnings:
Warning 1071 Specified key was too long; max key length is 1000 bytes
+SET sql_mode=DEFAULT;
CHECK TABLE t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/maria/maria-ucs2.test b/mysql-test/suite/maria/maria-ucs2.test
index fed67d780e9..69d3537e5d7 100644
--- a/mysql-test/suite/maria/maria-ucs2.test
+++ b/mysql-test/suite/maria/maria-ucs2.test
@@ -26,7 +26,11 @@ INSERT INTO t1 SELECT * FROM t1;
# check table is not needed to reproduce the problem,
# but shows that by this time the table appears to be okay.
CHECK TABLE t1;
+--error ER_TOO_LONG_KEY
ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
+SET sql_mode='NO_ENGINE_SUBSTITUTION';
+ALTER TABLE t1 MODIFY a VARCHAR(800) CHARSET `ucs2`;
+SET sql_mode=DEFAULT;
CHECK TABLE t1;
SHOW CREATE table t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/maria/maria.result b/mysql-test/suite/maria/maria.result
index a8c3f6d2d88..2b488561690 100644
--- a/mysql-test/suite/maria/maria.result
+++ b/mysql-test/suite/maria/maria.result
@@ -326,6 +326,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',
@@ -344,6 +345,7 @@ KEY `topic_id` (`topic_id`),
FULLTEXT KEY `post_text` (`post_text`)
) TRANSACTIONAL=0;
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;
REPAIR TABLE t1;
Table Op Msg_type Msg_text
test.t1 repair status OK
@@ -1584,18 +1586,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=Aria DEFAULT CHARSET=latin1 PAGE_CHECKSUM=0
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` (
@@ -2256,6 +2262,7 @@ check table t2 extended;
Table Op Msg_type Msg_text
test.t2 check status OK
drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
col0 float DEFAULT NULL,
col1 date DEFAULT NULL,
@@ -2434,6 +2441,7 @@ col173 tinytext,
col174 decimal(10,0) DEFAULT NULL,
col175 double DEFAULT NULL
) engine=aria;
+SET sql_mode = DEFAULT;
insert ignore into t1 set
col10=abs(28449) % 2,
col11='1973',
@@ -2544,6 +2552,8 @@ col170=if(abs(29965)%100<20,null,'resynthesis'),
col173=if(abs(-451)%100<20,null,'Clute'),
col174=if(abs(3262594.6284981840)%100<20,null,17846);
Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col58'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'col106'
Warning 1265 Data truncated for column 'col25' at row 1
Warning 1264 Out of range value for column 'col29' at row 1
Warning 1265 Data truncated for column 'col36' at row 1
@@ -2643,11 +2653,13 @@ alter table t1 partition by list (s1) (partition p1 values in (2));
ERROR HY000: Table has no partition for value 1
drop table t1;
create table t1(a int primary key, b blob, c blob) engine=aria;
+set sql_mode='';
insert into t1 values(1,repeat('a',100), repeat('b',657860));
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
insert into t1 values(1,repeat('a',100), repeat('b',657860));
ERROR 23000: Duplicate entry '1' for key 'PRIMARY'
+set sql_mode=default;
check table t1;
Table Op Msg_type Msg_text
test.t1 check status OK
diff --git a/mysql-test/suite/maria/maria.test b/mysql-test/suite/maria/maria.test
index 68276fc507d..b278783aa7b 100644
--- a/mysql-test/suite/maria/maria.test
+++ b/mysql-test/suite/maria/maria.test
@@ -65,7 +65,7 @@ disable_query_log;
SET SQL_WARNINGS=0;
while ($1)
{
- eval insert into t1 (b) values(repeat(char(65+$1),65550-$1));
+ eval insert ignore into t1 (b) values(repeat(char(65+$1),65550-$1));
dec $1;
}
SET SQL_WARNINGS=1;
@@ -344,6 +344,7 @@ drop table t1;
#
# Test of REPAIR that once failed
#
+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',
@@ -363,6 +364,7 @@ CREATE TABLE `t1` (
) TRANSACTIONAL=0;
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;
REPAIR TABLE t1;
CHECK TABLE t1;
@@ -921,10 +923,14 @@ source include/varchar.inc;
create table t1 (v varchar(65530), key(v));
drop table if exists t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65536));
+set sql_mode = DEFAULT;
show create table t1;
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65530) character set utf8);
+set sql_mode = DEFAULT;
show create table t1;
drop table t1;
@@ -1490,6 +1496,7 @@ insert into t2 values (repeat('x',28)), (repeat('p',21)), (repeat('k',241)),
check table t2 extended;
drop table t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
col0 float DEFAULT NULL,
col1 date DEFAULT NULL,
@@ -1668,6 +1675,7 @@ col173 tinytext,
col174 decimal(10,0) DEFAULT NULL,
col175 double DEFAULT NULL
) engine=aria;
+SET sql_mode = DEFAULT;
insert ignore into t1 set
col10=abs(28449) % 2,
@@ -1880,9 +1888,11 @@ drop table t1;
#
create table t1(a int primary key, b blob, c blob) engine=aria;
+set sql_mode='';
insert into t1 values(1,repeat('a',100), repeat('b',657860));
--error ER_DUP_ENTRY
insert into t1 values(1,repeat('a',100), repeat('b',657860));
+set sql_mode=default;
check table t1;
drop table t1;
diff --git a/mysql-test/suite/maria/maria3.result b/mysql-test/suite/maria/maria3.result
index 6099dc9c982..8aa32ee24f3 100644
--- a/mysql-test/suite/maria/maria3.result
+++ b/mysql-test/suite/maria/maria3.result
@@ -278,7 +278,7 @@ KEY (ulong),
KEY (ulonglong,ulong),
KEY (options,flags)
) engine=aria;
-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');
create table t2 (primary key (auto)) engine=aria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
check table t1,t2;
Table Op Msg_type Msg_text
@@ -420,6 +420,9 @@ create table t3 select t1.c AS c1, t2.c AS c2,1 as "const" from t1, t2;
drop table t1, t2, t3;
create table t1 (t datetime) engine=aria;
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
@@ -434,8 +437,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
optimize table t1;
Table Op Msg_type Msg_text
test.t1 optimize status OK
diff --git a/mysql-test/suite/maria/maria3.test b/mysql-test/suite/maria/maria3.test
index b4e3e30d63f..3e2f103a34c 100644
--- a/mysql-test/suite/maria/maria3.test
+++ b/mysql-test/suite/maria/maria3.test
@@ -241,7 +241,7 @@ CREATE TABLE t1 (
KEY (ulonglong,ulong),
KEY (options,flags)
) engine=aria;
-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');
create table t2 (primary key (auto)) engine=aria row_format=page select auto+1 as auto,1 as t1, 'a' as t2, repeat('a',256) as t3, binary repeat('b',256) as t4, repeat('a',4096) as t5, binary repeat('b',4096) as t6, '' as t7, binary '' as t8 from t1;
check table t1,t2;
select t1,t2,length(t3),length(t4),length(t5),length(t6),t7,t8 from t2;
diff --git a/mysql-test/suite/maria/ps_maria.result b/mysql-test/suite/maria/ps_maria.result
index 6ce10fc2bce..1503cd49d5f 100644
--- a/mysql-test/suite/maria/ps_maria.result
+++ b/mysql-test/suite/maria/ps_maria.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/suite/optimizer_unfixed_bugs/r/bug43360.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
index 33a4d5c2f30..899bf04e635 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43360.result
@@ -18,7 +18,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'),
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
index 505dd587d0b..0d88ff3d2cb 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43617.result
@@ -20,7 +20,7 @@ Note 1265 Data truncated for column 'c3' at row 1
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
-INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
+INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
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/suite/optimizer_unfixed_bugs/r/bug43618.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result
index 35cbe35bc7e..d3d04cbf260 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug43618.result
@@ -18,7 +18,7 @@ Note 1265 Data truncated for column 'c3' at row 1
INSERT INTO t1 VALUES('2008-01-01',NULL,'08-01-02','08/01/03');
INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
-INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
+INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
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/suite/optimizer_unfixed_bugs/r/bug45219.result b/mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result
index 1335120b6b0..b744dd836b6 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result
+++ b/mysql-test/suite/optimizer_unfixed_bugs/r/bug45219.result
@@ -19,6 +19,14 @@ INSERT INTO `CC` 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 `C` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -28,7 +36,7 @@ PRIMARY KEY (`pk`),
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
-INSERT INTO `C` VALUES
+INSERT IGNORE INTO `C` 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'),
@@ -39,6 +47,15 @@ INSERT INTO `C` 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 `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -93,6 +110,19 @@ INSERT INTO `CC` VALUES
(27,0,0,'2000-10-19','2002-03-22 11:48:37','e','e'),
(28,2,8,'2005-07-07','0000-00-00 00:00:00','p','p'),
(29,0,0,'2008-10-18','2001-01-04 03:55:07','x','x');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 3
+Warning 1264 Out of range value for column 'date_key' at row 7
+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 'date_key' at row 10
+Warning 1264 Out of range value for column 'datetime_key' at row 10
+Warning 1264 Out of range value for column 'date_key' at row 12
+Warning 1264 Out of range value for column 'date_key' at row 13
+Warning 1264 Out of range value for column 'datetime_key' at row 13
+Warning 1264 Out of range value for column 'date_key' at row 15
+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 `C` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -107,7 +137,7 @@ KEY `date_key` (`date_key`),
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
-INSERT INTO `C` VALUES
+INSERT IGNORE INTO `C` VALUES
(1,9,9,'2007-12-01','0000-00-00 00:00:00','p','p'),
(2,0,0,'0000-00-00','2002-02-09 07:38:13','v','v'),
(3,8,6,'0000-00-00','2001-05-03 12:08:14','t','t'),
@@ -128,6 +158,26 @@ INSERT INTO `C` VALUES
(18,7,0,'0000-00-00','0000-00-00 00:00:00','',''),
(19,0,9,'0000-00-00','2008-12-17 20:15:40','q','q'),
(20,9,5,'0000-00-00','0000-00-00 00:00:00','u','u');
+Warnings:
+Warning 1264 Out of range value for column 'datetime_key' at row 1
+Warning 1264 Out of range value for column 'date_key' at row 2
+Warning 1264 Out of range value for column 'date_key' at row 3
+Warning 1264 Out of range value for column 'datetime_key' at row 4
+Warning 1264 Out of range value for column 'date_key' at row 5
+Warning 1264 Out of range value for column 'date_key' 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_key' at row 7
+Warning 1264 Out of range value for column 'date_key' at row 8
+Warning 1264 Out of range value for column 'datetime_key' at row 8
+Warning 1264 Out of range value for column 'date_key' at row 9
+Warning 1264 Out of range value for column 'date_key' at row 12
+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 'date_key' at row 18
+Warning 1264 Out of range value for column 'datetime_key' at row 18
+Warning 1264 Out of range value for column 'date_key' at row 19
+Warning 1264 Out of range value for column 'date_key' at row 20
+Warning 1264 Out of range value for column 'datetime_key' at row 20
CREATE TABLE `BB` (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -142,8 +192,10 @@ KEY `date_key` (`date_key`),
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
-INSERT INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
+INSERT IGNORE INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
08:08:38','i','i'),(11,0,8,'2005-08-18','2000-05-21 03:51:51','','');
+Warnings:
+Warning 1264 Out of range value for column 'date_key' at row 1
SELECT DISTINCT BIT_AND( OUTR . `datetime_key` ) AS X
FROM C AS OUTR
WHERE ( OUTR . `int_nokey` , OUTR . `pk` ) IN (
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
index d8b8b1f64a3..9bfff0ccdb7 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43360.test
@@ -28,7 +28,7 @@ INSERT INTO t1 VALUES
('IB','IBM- Inc.'),
('GO','Google Inc.');
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
('AB','Sweden'),
('JA','USA'),
('MS','United States of America'),
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
index 4a3544958d2..2b5b5fd96dd 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43617.test
@@ -36,7 +36,7 @@ INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
# Insert empty string '', would be converted to zero value of the appropriate type
-INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
+INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
--sorted_result
SELECT * FROM t1;
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test
index 02e93cdf01a..3d9430ba34f 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug43618.test
@@ -36,7 +36,7 @@ INSERT INTO t1(c1,c2) VALUES('08/01/17',NULL);
DELETE FROM t1 WHERE c1='08/01/17' AND c2 IS NULL;
# Insert empty string '', would be converted to zero value of the appropriate type
-INSERT INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
+INSERT IGNORE INTO t1 VALUES('','','08-01-04','08/01/05') /* Inserts zero dates for '' strings */;
INSERT INTO t1 VALUES('1971-01-01 00:00:01','1980-01-01 00:00:01','2009-01-01','2009-01-02'),('1990-01-01 00:00:01','2000-01-01 00:00:01','2009-01-03','2009-01-04'),('2038-01-09 03:14:07','2038-01-09 03:14:07','2009-01-05','2009-01-06');
diff --git a/mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test b/mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test
index 85e24824afc..e5fc841e2bf 100644
--- a/mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test
+++ b/mysql-test/suite/optimizer_unfixed_bugs/t/bug45219.test
@@ -42,7 +42,7 @@ CREATE TABLE `C` (
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
-INSERT INTO `C` VALUES
+INSERT IGNORE INTO `C` 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'),
@@ -130,7 +130,7 @@ CREATE TABLE `C` (
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=21 DEFAULT CHARSET=latin1;
-INSERT INTO `C` VALUES
+INSERT IGNORE INTO `C` VALUES
(1,9,9,'2007-12-01','0000-00-00 00:00:00','p','p'),
(2,0,0,'0000-00-00','2002-02-09 07:38:13','v','v'),
(3,8,6,'0000-00-00','2001-05-03 12:08:14','t','t'),
@@ -165,7 +165,7 @@ CREATE TABLE `BB` (
KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;
-INSERT INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
+INSERT IGNORE INTO `BB` VALUES (10,8,5,'0000-00-00','2007-08-19
08:08:38','i','i'),(11,0,8,'2005-08-18','2000-05-21 03:51:51','','');
SELECT DISTINCT BIT_AND( OUTR . `datetime_key` ) AS X
diff --git a/mysql-test/suite/parts/inc/partition_enum.inc b/mysql-test/suite/parts/inc/partition_enum.inc
index 87e88983055..f056162e89e 100644
--- a/mysql-test/suite/parts/inc/partition_enum.inc
+++ b/mysql-test/suite/parts/inc/partition_enum.inc
@@ -32,7 +32,7 @@ let $letter=26;
begin;
while ($letter)
{
-eval insert into t2 values (char(ascii('A')+$letter));
+eval insert ignore into t2 values (char(ascii('A')+$letter));
dec $letter;
}
commit;
diff --git a/mysql-test/suite/parts/inc/partition_year.inc b/mysql-test/suite/parts/inc/partition_year.inc
index 2be9d158090..ff221d05b95 100644
--- a/mysql-test/suite/parts/inc/partition_year.inc
+++ b/mysql-test/suite/parts/inc/partition_year.inc
@@ -27,7 +27,7 @@ let $count=255;
begin;
while ($count)
{
-eval insert into t2 values (1901+$count);
+eval insert ignore into t2 values (1901+$count);
dec $count;
}
commit;
diff --git a/mysql-test/suite/perfschema/include/digest_execution.inc b/mysql-test/suite/perfschema/include/digest_execution.inc
index 5483cca61d7..cf83bf9f51b 100644
--- a/mysql-test/suite/perfschema/include/digest_execution.inc
+++ b/mysql-test/suite/perfschema/include/digest_execution.inc
@@ -96,7 +96,7 @@ CREATE TABLE dup_table (c char(4));
--ERROR ER_TABLE_EXISTS_ERROR
CREATE TABLE dup_table (c char(4));
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
# -----------------------------------------------------------------------
# Tests to show sub-statements for following statements are not
diff --git a/mysql-test/suite/perfschema/r/digest_table_full.result b/mysql-test/suite/perfschema/r/digest_table_full.result
index f52b78c9f7d..5c8d2eb23d1 100644
--- a/mysql-test/suite/perfschema/r/digest_table_full.result
+++ b/mysql-test/suite/perfschema/r/digest_table_full.result
@@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
diff --git a/mysql-test/suite/perfschema/r/dml_setup_objects.result b/mysql-test/suite/perfschema/r/dml_setup_objects.result
index b5681706d46..cf454d28750 100644
--- a/mysql-test/suite/perfschema/r/dml_setup_objects.result
+++ b/mysql-test/suite/perfschema/r/dml_setup_objects.result
@@ -14,10 +14,12 @@ OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
+set sql_mode= '';
insert into performance_schema.setup_objects
set object_type='ILLEGAL', object_schema='FOO', object_name='BAR',
enabled='YES', timed='YES';
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
+set sql_mode= DEFAULT;
insert into performance_schema.setup_objects
set object_type='TABLE', object_schema='FOO', object_name='BAR',
enabled='YES', timed='YES';
@@ -37,9 +39,11 @@ select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
OBJECT_TYPE OBJECT_SCHEMA OBJECT_NAME ENABLED TIMED
TABLE FOO BAR NO YES
+set sql_mode= '';
update performance_schema.setup_objects
set object_type='ILLEGAL';
ERROR HY000: Invalid performance_schema usage
+set sql_mode= DEFAULT;
update performance_schema.setup_objects
set object_schema='ILLEGAL';
ERROR HY000: Invalid performance_schema usage
diff --git a/mysql-test/suite/perfschema/r/setup_objects.result b/mysql-test/suite/perfschema/r/setup_objects.result
index 94ef4baab29..c29aaa2114f 100644
--- a/mysql-test/suite/perfschema/r/setup_objects.result
+++ b/mysql-test/suite/perfschema/r/setup_objects.result
@@ -25,6 +25,7 @@ insert into performance_schema.setup_objects
values ('TABLE', 'db4', 't1', 'NO', 'YES');
insert into performance_schema.setup_objects
values ('TABLE', 'db4', '%', 'YES', 'NO');
+set sql_mode= '';
insert into performance_schema.setup_objects
values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
ERROR 23000: Cannot add or update a child row: a foreign key constraint fails
@@ -81,6 +82,7 @@ TABLE db3 t1 YES YES
TABLE db3 t2 NO NO
TABLE db4 % YES NO
TABLE db4 t1 NO YES
+set sql_mode= DEFAULT;
drop database if exists db1;
drop database if exists db2;
drop database if exists db3;
diff --git a/mysql-test/suite/perfschema/r/start_server_no_digests.result b/mysql-test/suite/perfschema/r/start_server_no_digests.result
index e4b389716a9..f8301e62a7f 100644
--- a/mysql-test/suite/perfschema/r/start_server_no_digests.result
+++ b/mysql-test/suite/perfschema/r/start_server_no_digests.result
@@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
diff --git a/mysql-test/suite/perfschema/r/statement_digest.result b/mysql-test/suite/perfschema/r/statement_digest.result
index 6abe865f1aa..ba2e5069c9a 100644
--- a/mysql-test/suite/perfschema/r/statement_digest.result
+++ b/mysql-test/suite/perfschema/r/statement_digest.result
@@ -79,7 +79,7 @@ CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
@@ -133,7 +133,7 @@ statements_digest DROP SCHEMA `statements_digest_temp` 2 0 0 0
statements_digest SELECT ? FROM `no_such_table` 1 0 0 1
statements_digest CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2 0 0 1
statements_digest DROP TABLE `dup_table` 1 0 0 0
-statements_digest INSERT INTO `t11` VALUES (?) 1 1 1 0
+statements_digest INSERT IGNORE INTO `t11` VALUES (?) 1 1 1 0
statements_digest SHOW WARNINGS 1 0 0 0
statements_digest PREPARE `stmt` FROM ? 1 0 0 0
statements_digest EXECUTE `stmt` 2 0 0 0
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers.result b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
index db60362dd92..140c26f4edd 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers.result
@@ -93,7 +93,7 @@ CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
@@ -146,7 +146,7 @@ statements_digest DROP SCHEMA `statements_digest_temp` 2
statements_digest SELECT ? FROM `no_such_table` 1
statements_digest CREATE TABLE `dup_table` ( `c` CHARACTER (?) ) 2
statements_digest DROP TABLE `dup_table` 1
-statements_digest INSERT INTO `t11` VALUES (?) 1
+statements_digest INSERT IGNORE INTO `t11` VALUES (?) 1
statements_digest SHOW WARNINGS 1
statements_digest PREPARE `stmt` FROM ? 1
statements_digest EXECUTE `stmt` 2
diff --git a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
index 434914c65e7..54eba51c1ed 100644
--- a/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
+++ b/mysql-test/suite/perfschema/r/statement_digest_consumers2.result
@@ -93,7 +93,7 @@ CREATE TABLE dup_table (c char(4));
CREATE TABLE dup_table (c char(4));
ERROR 42S01: Table 'dup_table' already exists
DROP TABLE dup_table;
-INSERT INTO t11 VALUES("MySQL");
+INSERT IGNORE INTO t11 VALUES("MySQL");
Warnings:
Warning 1265 Data truncated for column 'c' at row 1
PREPARE stmt FROM "SELECT * FROM t12";
diff --git a/mysql-test/suite/perfschema/t/dml_setup_objects.test b/mysql-test/suite/perfschema/t/dml_setup_objects.test
index 29594bf32f9..3868da276a0 100644
--- a/mysql-test/suite/perfschema/t/dml_setup_objects.test
+++ b/mysql-test/suite/perfschema/t/dml_setup_objects.test
@@ -26,10 +26,12 @@ select * from performance_schema.setup_objects
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
+set sql_mode= '';
--error ER_NO_REFERENCED_ROW_2
insert into performance_schema.setup_objects
set object_type='ILLEGAL', object_schema='FOO', object_name='BAR',
enabled='YES', timed='YES';
+set sql_mode= DEFAULT;
insert into performance_schema.setup_objects
set object_type='TABLE', object_schema='FOO', object_name='BAR',
@@ -53,9 +55,11 @@ insert into performance_schema.setup_objects
select * from performance_schema.setup_objects
order by object_type, object_schema, object_name;
+set sql_mode= '';
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_objects
set object_type='ILLEGAL';
+set sql_mode= DEFAULT;
--error ER_WRONG_PERFSCHEMA_USAGE
update performance_schema.setup_objects
diff --git a/mysql-test/suite/perfschema/t/setup_objects.test b/mysql-test/suite/perfschema/t/setup_objects.test
index cd1b4ce80e0..eb22953b1a6 100644
--- a/mysql-test/suite/perfschema/t/setup_objects.test
+++ b/mysql-test/suite/perfschema/t/setup_objects.test
@@ -49,6 +49,7 @@ insert into performance_schema.setup_objects
# Also test insert of invalid enum values
+set sql_mode= '';
--error ER_NO_REFERENCED_ROW_2
insert into performance_schema.setup_objects
values ('SOMETHING', 'bad1', 'bad1', 'YES', 'NO');
@@ -88,6 +89,7 @@ update performance_schema.setup_objects
select * from performance_schema.setup_objects
order by OBJECT_TYPE, OBJECT_SCHEMA, OBJECT_NAME;
+set sql_mode= DEFAULT;
--disable_warnings
drop database if exists db1;
diff --git a/mysql-test/suite/plugins/r/qc_info.result b/mysql-test/suite/plugins/r/qc_info.result
index 2f518a7ef65..a2e68b1fcb3 100644
--- a/mysql-test/suite/plugins/r/qc_info.result
+++ b/mysql-test/suite/plugins/r/qc_info.result
@@ -28,7 +28,7 @@ set time_zone= @time_zone, default_week_format= @default_week_format, character_
select * from information_schema.query_cache_info;
STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER
test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 # 0 0 0 #
-test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 #
+test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 #
drop table t1;
select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
statement_schema statement_text result_blocks_count result_blocks_size
diff --git a/mysql-test/suite/plugins/r/qc_info_priv.result b/mysql-test/suite/plugins/r/qc_info_priv.result
index ade6901dec5..11203c3f4ce 100644
--- a/mysql-test/suite/plugins/r/qc_info_priv.result
+++ b/mysql-test/suite/plugins/r/qc_info_priv.result
@@ -28,7 +28,7 @@ set time_zone= @time_zone, default_week_format= @default_week_format, character_
select * from information_schema.query_cache_info;
STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER
test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 # 0 0 0 #
-test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 #
+test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 # 0 0 1 #
create user mysqltest;
connect conn1,localhost,mysqltest,,;
connection conn1;
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index 8346171ba3f..466ddbb2380 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -109,7 +109,7 @@ create definer=current_role trigger tr1 before insert on t2 for each row
insert t1 values (111, 222, 333);
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=`role1` trigger tr1 before insert on t2 for each row
+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=`role1` trigger tr1 before insert on t2 for each row
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci #
set role none;
insert t2 values (11,22,33);
@@ -126,7 +126,7 @@ create definer=role2 trigger tr2 before delete on t2 for each row
insert t1 values (111, 222, 333);
show create trigger tr2;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` trigger tr2 before delete on t2 for each row
+tr2 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` trigger tr2 before delete on t2 for each row
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci #
delete from t2 where a=1;
select * from t1;
@@ -144,7 +144,7 @@ Warnings:
Note 1449 The user specified as a definer ('role3'@'%') does not exist
show create trigger tr3;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` trigger tr3 before update on t2 for each row
+tr3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` trigger tr3 before update on t2 for each row
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci #
update t2 set b=2 where a=2;
ERROR HY000: The user specified as a definer ('role3'@'%') does not exist
@@ -158,7 +158,7 @@ a b c
flush tables;
show create trigger tr2;
Trigger sql_mode SQL Original Statement character_set_client collation_connection Database Collation Created
-tr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2`@`` trigger tr2 before delete on t2 for each row
+tr2 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2`@`` trigger tr2 before delete on t2 for each row
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci #
delete from t2 where a=2;
ERROR HY000: The user specified as a definer ('role2'@'%') does not exist
@@ -175,7 +175,7 @@ set role role1;
create definer=current_role procedure pr1() insert t1 values (111, 222, 333);
show create procedure pr1;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pr1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr1`()
+pr1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr1`()
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
call pr1();
@@ -187,7 +187,7 @@ a b c
create definer=role2 procedure pr2() insert t1 values (111, 222, 333);
show create procedure pr2;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pr2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` PROCEDURE `pr2`()
+pr2 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` PROCEDURE `pr2`()
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
call pr2();
select * from t1;
@@ -201,7 +201,7 @@ Warnings:
Note 1449 The user specified as a definer ('role3'@'%') does not exist
show create procedure pr3;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pr3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` PROCEDURE `pr3`()
+pr3 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role3`@`%` PROCEDURE `pr3`()
insert t1 values (111, 222, 333) latin1 latin1_swedish_ci latin1_swedish_ci
call pr3();
ERROR HY000: The user specified as a definer ('role3'@'%') does not exist
@@ -218,7 +218,7 @@ set role role1;
create definer=current_role function fn1() returns int return (select sum(a+b) from t1);
show create function fn1;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-fn1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` FUNCTION `fn1`() RETURNS int(11)
+fn1 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` FUNCTION `fn1`() RETURNS int(11)
return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
select fn1();
@@ -230,7 +230,7 @@ a b c
create definer=role2 function fn2() returns int return (select sum(a+b) from t1);
show create function fn2;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-fn2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` FUNCTION `fn2`() RETURNS int(11)
+fn2 STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role2` FUNCTION `fn2`() RETURNS int(11)
return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci
select fn2();
fn2()
@@ -240,7 +240,7 @@ Warnings:
Note 1449 The user specified as a definer ('role3'@'%') does not exist
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=`role3`@`%` FUNCTION `fn3`() RETURNS int(11)
+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=`role3`@`%` FUNCTION `fn3`() RETURNS int(11)
return (select sum(a+b) from t1) latin1 latin1_swedish_ci latin1_swedish_ci
select fn3();
ERROR HY000: The user specified as a definer ('role3'@'%') does not exist
@@ -253,7 +253,7 @@ create definer=current_role event e1 on schedule every 1 second starts '2000-01-
insert t1 values (111, 2, 0);
show create event e1;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-e1 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role1` EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) latin1 latin1_swedish_ci latin1_swedish_ci
+e1 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=`role1` EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) latin1 latin1_swedish_ci latin1_swedish_ci
set role none;
create definer=role3 event e3 on schedule every 1 second starts '2000-01-01' do
insert t1 values (111, 3, 0);
@@ -261,12 +261,12 @@ Warnings:
Note 1449 The user specified as a definer ('role3'@'%') does not exist
show create event e3;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-e3 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role3`@`%` EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) latin1 latin1_swedish_ci latin1_swedish_ci
+e3 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=`role3`@`%` EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) latin1 latin1_swedish_ci latin1_swedish_ci
create definer=role2 event e2 on schedule every 1 second starts '2000-01-01' do
insert t1 values (111, 4, 0);
show create event e2;
Event sql_mode time_zone Create Event character_set_client collation_connection Database Collation
-e2 NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION SYSTEM CREATE DEFINER=`role2` EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) latin1 latin1_swedish_ci latin1_swedish_ci
+e2 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=`role2` EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) latin1 latin1_swedish_ci latin1_swedish_ci
set global event_scheduler=off;
select distinct * from t1;
a b c
@@ -343,7 +343,7 @@ INSERT INTO `t2` VALUES (2,20,200);
/*!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=`role1`*/ /*!50003 trigger tr1 before insert on t2 for each row
insert t1 values (111, 222, 333) */;;
@@ -359,7 +359,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=`role3`@`%`*/ /*!50003 trigger tr3 before update on t2 for each row
insert t1 values (111, 222, 333) */;;
@@ -375,7 +375,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=`role2`@``*/ /*!50003 trigger tr2 before delete on t2 for each row
insert t1 values (111, 222, 333) */;;
@@ -393,7 +393,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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE*/ /*!50117 DEFINER=`role1`*/ /*!50106 EVENT `e1` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 2, 0) */ ;;
@@ -410,7 +410,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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE*/ /*!50117 DEFINER=`role2`*/ /*!50106 EVENT `e2` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 4, 0) */ ;;
@@ -427,7 +427,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' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
/*!50106 CREATE*/ /*!50117 DEFINER=`role3`@`%`*/ /*!50106 EVENT `e3` ON SCHEDULE EVERY 1 SECOND STARTS '2000-01-01 00:00:00' ON COMPLETION NOT PRESERVE ENABLE DO insert t1 values (111, 3, 0) */ ;;
@@ -445,7 +445,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=`role1` FUNCTION `fn1`() RETURNS int(11)
return (select sum(a+b) from t1) ;;
@@ -461,7 +461,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=`role2` FUNCTION `fn2`() RETURNS int(11)
return (select sum(a+b) from t1) ;;
@@ -477,7 +477,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=`role3`@`%` FUNCTION `fn3`() RETURNS int(11)
return (select sum(a+b) from t1) ;;
@@ -493,7 +493,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=`role1` PROCEDURE `pr1`()
insert t1 values (111, 222, 333) ;;
@@ -509,7 +509,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=`role2`@`%` PROCEDURE `pr2`()
insert t1 values (111, 222, 333) ;;
@@ -525,7 +525,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=`role3`@`%` PROCEDURE `pr3`()
insert t1 values (111, 222, 333) ;;
diff --git a/mysql-test/suite/roles/none_public.result b/mysql-test/suite/roles/none_public.result
index 9e2c680aad1..5dd1480e8c3 100644
--- a/mysql-test/suite/roles/none_public.result
+++ b/mysql-test/suite/roles/none_public.result
@@ -43,7 +43,7 @@ drop role role1;
optimize table mysql.user;
Table Op Msg_type Msg_text
mysql.user optimize status OK
-insert mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
+insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
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/suite/roles/none_public.test b/mysql-test/suite/roles/none_public.test
index 8e370d80007..838a4955df5 100644
--- a/mysql-test/suite/roles/none_public.test
+++ b/mysql-test/suite/roles/none_public.test
@@ -51,7 +51,7 @@ create definer=public view test.v1 as select 1;
drop role role1;
optimize table mysql.user; # to remove deleted rows and have stable row order
-insert mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
+insert ignore mysql.user (user, is_role) values ('none', 'Y'), ('public', 'Y');
flush privileges;
delete from mysql.user where is_role='Y';
diff --git a/mysql-test/suite/roles/rpl_definer.result b/mysql-test/suite/roles/rpl_definer.result
index f4cc5dad39e..4e8ca5fba2b 100644
--- a/mysql-test/suite/roles/rpl_definer.result
+++ b/mysql-test/suite/roles/rpl_definer.result
@@ -21,19 +21,19 @@ create definer=current_role procedure pcr() select current_role;
create definer=role1 procedure pr() select "role1";
show create procedure pcu;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pcu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`()
+pcu 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 `pcu`()
select current_user latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pu;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`()
+pu 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 `pu`()
select "root@localhost" latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pcr;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pcr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`()
+pcr STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`()
select current_role latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pr;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`()
+pr STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`()
select "role1" latin1 latin1_swedish_ci latin1_swedish_ci
connection slave;
set role role1;
@@ -49,19 +49,19 @@ GRANT role2 TO 'role1'
GRANT role2 TO 'root'@'localhost' WITH ADMIN OPTION
show create procedure pcu;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pcu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pcu`()
+pcu 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 `pcu`()
select current_user latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pu;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pu NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` PROCEDURE `pu`()
+pu 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 `pu`()
select "root@localhost" latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pcr;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pcr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`()
+pcr STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pcr`()
select current_role latin1 latin1_swedish_ci latin1_swedish_ci
show create procedure pr;
Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation
-pr NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`()
+pr STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`role1` PROCEDURE `pr`()
select "role1" latin1 latin1_swedish_ci latin1_swedish_ci
connection master;
drop procedure pcu;
diff --git a/mysql-test/suite/roles/set_default_role_for.result b/mysql-test/suite/roles/set_default_role_for.result
index 947275dadab..9880671ba09 100644
--- a/mysql-test/suite/roles/set_default_role_for.result
+++ b/mysql-test/suite/roles/set_default_role_for.result
@@ -44,7 +44,7 @@ GRANT USAGE ON *.* TO 'user_b'@'localhost'
GRANT INSERT, UPDATE ON *.* TO 'role_b'
select user, host, default_role from mysql.user where user like 'user_%';
ERROR 42000: SELECT command denied to user 'user_b'@'localhost' for table 'user'
-insert into mysql.user (user, host) values ('someuser', 'somehost');
+insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
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/suite/roles/set_default_role_for.test b/mysql-test/suite/roles/set_default_role_for.test
index de35b529ce6..985eaa16e3d 100644
--- a/mysql-test/suite/roles/set_default_role_for.test
+++ b/mysql-test/suite/roles/set_default_role_for.test
@@ -66,7 +66,7 @@ show grants;
select user, host, default_role from mysql.user where user like 'user_%';
# Make sure the default role setting worked from root.
-insert into mysql.user (user, host) values ('someuser', 'somehost');
+insert ignore into mysql.user (user, host) values ('someuser', 'somehost');
# Since we have update privileges on the mysql.user table, we should
# be able to set a default role for a different user.
set default role NONE for user_a@localhost;
diff --git a/mysql-test/suite/rpl/include/hrtime.inc b/mysql-test/suite/rpl/include/hrtime.inc
index 84af425c909..7e654adbe69 100644
--- a/mysql-test/suite/rpl/include/hrtime.inc
+++ b/mysql-test/suite/rpl/include/hrtime.inc
@@ -11,8 +11,8 @@ insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','201
set timestamp=unix_timestamp('2022-02-02 02:02:02') + 0.654321;
insert t1 (b,c) values (now(), now());
-insert t1 (b,c) values (0,0);
-insert t1 (a,b,c) values (0,0,now(6));
+insert ignore t1 (b,c) values (0,0);
+insert ignore t1 (a,b,c) values (0,0,now(6));
select * from t1;
diff --git a/mysql-test/suite/rpl/r/rpl_bug31076.result b/mysql-test/suite/rpl/r/rpl_bug31076.result
index c163cc552ab..b01eab0e9a9 100644
--- a/mysql-test/suite/rpl/r/rpl_bug31076.result
+++ b/mysql-test/suite/rpl/r/rpl_bug31076.result
@@ -4,6 +4,7 @@ SET @saved_slave_type_conversions = @@slave_type_conversions;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE DATABASE track;
USE track;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `visits` (
`visits_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`myid` varchar(32) NOT NULL DEFAULT '',
@@ -23,6 +24,7 @@ KEY `ip` (`ip`),
KEY `time` (`time`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=21293381 DEFAULT CHARSET=latin1;
+SET sql_mode = DEFAULT;
CREATE TABLE `visits_events` (
`event_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
`visit_id` int(11) unsigned NOT NULL DEFAULT '0',
diff --git a/mysql-test/suite/rpl/r/rpl_checksum_cache.result b/mysql-test/suite/rpl/r/rpl_checksum_cache.result
index d3167496249..e8f221cc181 100644
--- a/mysql-test/suite/rpl/r/rpl_checksum_cache.result
+++ b/mysql-test/suite/rpl/r/rpl_checksum_cache.result
@@ -1,7 +1,7 @@
include/master-slave.inc
[connection master]
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t2 set data=repeat.*'a', @act_size.*");
-call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement is unsafe because it uses a system function that may return a different value on the slave. Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t2 set data=repeat.*'a', @act_size.*");
+call mtr.add_suppression("Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. .*Statement: insert into t1 values.* NAME_CONST.*'n',.*, @data .*");
connection master;
set @save_binlog_cache_size = @@global.binlog_cache_size;
set @save_binlog_checksum = @@global.binlog_checksum;
diff --git a/mysql-test/suite/rpl/r/rpl_concurrency_error.result b/mysql-test/suite/rpl/r/rpl_concurrency_error.result
index b95654d2245..c7f2d58e426 100644
--- a/mysql-test/suite/rpl/r/rpl_concurrency_error.result
+++ b/mysql-test/suite/rpl/r/rpl_concurrency_error.result
@@ -26,7 +26,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc
connection conn2;
SET AUTOCOMMIT = 1;
BEGIN;
-UPDATE t SET f = 'magenta 2' WHERE f = 'red';
+UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t VALUES (5 + (2 * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
@@ -45,7 +45,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 2' WHERE i = 3
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 2' WHERE f = 'red'
+master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 2' WHERE f = 'red'
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (2 * 10),"brown")
master-bin.000001 # Query # # ROLLBACK
connection conn1;
@@ -57,7 +57,7 @@ Note 1592 Unsafe statement written to the binary log using statement format sinc
connection conn2;
SET AUTOCOMMIT = 1;
BEGIN;
-UPDATE t SET f = 'dark blue 2' WHERE f = 'red';
+UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t VALUES (6 + (2 * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
@@ -74,7 +74,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 2' WHERE i = 3
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 2' WHERE f = 'red'
+master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 2' WHERE f = 'red'
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (2 * 10),"brown")
master-bin.000001 # Xid # # COMMIT /* XID */
connection conn1;
@@ -84,7 +84,7 @@ Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them
connection conn2;
SET AUTOCOMMIT = 0;
-UPDATE t SET f = 'magenta 1' WHERE f = 'red';
+UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t VALUES (5 + (1 * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
@@ -103,7 +103,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'yellow 1' WHERE i = 3
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'magenta 1' WHERE f = 'red'
+master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'magenta 1' WHERE f = 'red'
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (5 + (1 * 10),"brown")
master-bin.000001 # Query # # ROLLBACK
connection conn1;
@@ -113,7 +113,7 @@ Warnings:
Note 1592 Unsafe statement written to the binary log using statement format since BINLOG_FORMAT = STATEMENT. Statement accesses nontransactional table as well as transactional or temporary table, and writes to any of them
connection conn2;
SET AUTOCOMMIT = 0;
-UPDATE t SET f = 'dark blue 1' WHERE f = 'red';
+UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
INSERT INTO t VALUES (6 + (1 * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
@@ -130,7 +130,7 @@ master-bin.000001 # Gtid # # BEGIN GTID #-#-#
master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'gray 1' WHERE i = 3
master-bin.000001 # Xid # # COMMIT /* XID */
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Query # # use `test`; UPDATE t SET f = 'dark blue 1' WHERE f = 'red'
+master-bin.000001 # Query # # use `test`; UPDATE IGNORE t SET f = 'dark blue 1' WHERE f = 'red'
master-bin.000001 # Query # # use `test`; INSERT INTO t VALUES (6 + (1 * 10),"brown")
master-bin.000001 # Xid # # COMMIT /* XID */
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_function.result b/mysql-test/suite/rpl/r/rpl_create_drop_function.result
index 744e747134d..a8e16c350ac 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_function.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_function.result
@@ -9,7 +9,7 @@ ERROR 42000: FUNCTION hello already exists
connection slave;
SHOW CREATE FUNCTION hello;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-hello NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`root`@`localhost` FUNCTION `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1
+hello 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 `hello`(str CHAR(20)) RETURNS char(50) CHARSET latin1
DETERMINISTIC
RETURN
CONCAT('Hello, ', str, '!') latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/suite/rpl/r/rpl_do_grant.result b/mysql-test/suite/rpl/r/rpl_do_grant.result
index 67d1b51559b..794087857a7 100644
--- a/mysql-test/suite/rpl/r/rpl_do_grant.result
+++ b/mysql-test/suite/rpl/r/rpl_do_grant.result
@@ -148,7 +148,7 @@ GRANT EXECUTE, ALTER ROUTINE ON FUNCTION `bug42217_db`.`upgrade_del_func` TO 'cr
USE bug42217_db;
SHOW CREATE FUNCTION upgrade_del_func;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1
+upgrade_del_func STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1
BEGIN
RETURN "INSIDE upgrade_del_func()";
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -160,7 +160,7 @@ connection create_rout_db_slave;
USE bug42217_db;
SHOW CREATE FUNCTION upgrade_del_func;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-upgrade_del_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1
+upgrade_del_func STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_del_func`() RETURNS char(30) CHARSET latin1
BEGIN
RETURN "INSIDE upgrade_del_func()";
END latin1 latin1_swedish_ci latin1_swedish_ci
@@ -189,7 +189,7 @@ INSIDE upgrade_alter_func()
connection slave;
SHOW CREATE FUNCTION upgrade_alter_func;
Function sql_mode Create Function character_set_client collation_connection Database Collation
-upgrade_alter_func NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1
+upgrade_alter_func STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION CREATE DEFINER=`create_rout_db`@`localhost` FUNCTION `upgrade_alter_func`() RETURNS char(30) CHARSET latin1
BEGIN
RETURN "INSIDE upgrade_alter_func()";
END latin1 latin1_swedish_ci latin1_swedish_ci
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
index 81302266d82..942c3ae0b96 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_innodb.result
@@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
binary data';
INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+INSERT ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
Warnings:
Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
+INSERT ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third',
Warnings:
Warning 1264 Out of range value for column 'f5' at row 1
Warning 1264 Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
+INSERT ignore into t31 values (1, 1, 4, 'fourth',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -409,7 +409,7 @@ connection master;
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
-update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
index 12567f89af9..6d795065bf9 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_master_myisam.result
@@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
binary data';
INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+INSERT ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
Warnings:
Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
+INSERT ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third',
Warnings:
Warning 1264 Out of range value for column 'f5' at row 1
Warning 1264 Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
+INSERT ignore into t31 values (1, 1, 4, 'fourth',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -409,7 +409,7 @@ connection master;
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
-update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
index a07bac9340c..29021d71342 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_innodb.result
@@ -199,10 +199,12 @@ connection slave;
*** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
ENGINE='InnoDB';
+SET sql_mode = DEFAULT;
*** Create t7 on Master ***
connection master;
CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -235,9 +237,11 @@ connection slave;
*** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='InnoDB';
+SET sql_mode = DEFAULT;
*** Create t8 on Master ***
connection master;
CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
diff --git a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
index 280afed0385..c69d3be0cfe 100644
--- a/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_extra_col_slave_myisam.result
@@ -199,10 +199,12 @@ connection slave;
*** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
ENGINE='MyISAM';
+SET sql_mode = DEFAULT;
*** Create t7 on Master ***
connection master;
CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -235,9 +237,11 @@ connection slave;
*** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='MyISAM';
+SET sql_mode = DEFAULT;
*** Create t8 on Master ***
connection master;
CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
diff --git a/mysql-test/suite/rpl/r/rpl_function_defaults.result b/mysql-test/suite/rpl/r/rpl_function_defaults.result
index e0d2ff14c43..46bdc29fac9 100644
--- a/mysql-test/suite/rpl/r/rpl_function_defaults.result
+++ b/mysql-test/suite/rpl/r/rpl_function_defaults.result
@@ -34,6 +34,7 @@ n DATETIME(6) DEFAULT CURRENT_TIMESTAMP(6),
o INT
);
INSERT INTO t1 ( o ) VALUES ( 1 );
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
b TIMESTAMP(1) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(1),
@@ -51,7 +52,16 @@ m DATETIME(5) ON UPDATE CURRENT_TIMESTAMP(5),
n DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6),
o INT
);
-INSERT INTO t2 ( o ) VALUES ( 1 );
+SET sql_mode = DEFAULT;
+INSERT IGNORE INTO t2 ( o ) VALUES ( 1 );
+Warnings:
+Warning 1978 Incorrect default value '0000-00-00 00:00:00' for column 'a'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.0' for column 'b'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.00' for column 'c'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.000' for column 'd'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.0000' for column 'e'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.00000' for column 'f'
+Warning 1978 Incorrect default value '0000-00-00 00:00:00.000000' for column 'g'
sync_slave_with_master
connection slave;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_hrtime.result b/mysql-test/suite/rpl/r/rpl_hrtime.result
index eb470fa2274..2cd950027b3 100644
--- a/mysql-test/suite/rpl/r/rpl_hrtime.result
+++ b/mysql-test/suite/rpl/r/rpl_hrtime.result
@@ -7,8 +7,12 @@ insert t1 (b,c) values (now(6), now(6));
insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010');
set timestamp=unix_timestamp('2022-02-02 02:02:02') + 0.654321;
insert t1 (b,c) values (now(), now());
-insert t1 (b,c) values (0,0);
-insert t1 (a,b,c) values (0,0,now(6));
+insert ignore t1 (b,c) values (0,0);
+Warnings:
+Warning 1264 Out of range value for column 'c' at row 1
+insert ignore t1 (a,b,c) values (0,0,now(6));
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
a b c
2011-01-01 01:01:01.1234 2011-01-01 01:01:01.123456 2011-01-01 01:01:01.12
@@ -38,7 +42,7 @@ use `test`/*!*/;
SET TIMESTAMP=1293832861/*!*/;
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/*!*/;
@@ -74,7 +78,7 @@ COMMIT
BEGIN
/*!*/;
SET TIMESTAMP=1643756522.654321/*!*/;
-insert t1 (b,c) values (0,0)
+insert ignore t1 (b,c) values (0,0)
/*!*/;
SET TIMESTAMP=1643756522.654321/*!*/;
COMMIT
@@ -82,7 +86,7 @@ COMMIT
BEGIN
/*!*/;
SET TIMESTAMP=1643756522.654321/*!*/;
-insert t1 (a,b,c) values (0,0,now(6))
+insert ignore t1 (a,b,c) values (0,0,now(6))
/*!*/;
SET TIMESTAMP=1643756522.654321/*!*/;
COMMIT
diff --git a/mysql-test/suite/rpl/r/rpl_hrtime_row.result b/mysql-test/suite/rpl/r/rpl_hrtime_row.result
index 9f6ac704ff3..7fbd186583f 100644
--- a/mysql-test/suite/rpl/r/rpl_hrtime_row.result
+++ b/mysql-test/suite/rpl/r/rpl_hrtime_row.result
@@ -7,8 +7,12 @@ insert t1 (b,c) values (now(6), now(6));
insert t1 values ('2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010','2010-10-10 10:10:10.101010');
set timestamp=unix_timestamp('2022-02-02 02:02:02') + 0.654321;
insert t1 (b,c) values (now(), now());
-insert t1 (b,c) values (0,0);
-insert t1 (a,b,c) values (0,0,now(6));
+insert ignore t1 (b,c) values (0,0);
+Warnings:
+Warning 1264 Out of range value for column 'c' at row 1
+insert ignore t1 (a,b,c) values (0,0,now(6));
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
a b c
2011-01-01 01:01:01.1234 2011-01-01 01:01:01.123456 2011-01-01 01:01:01.12
diff --git a/mysql-test/suite/rpl/r/rpl_mdev382.result b/mysql-test/suite/rpl/r/rpl_mdev382.result
index 0d75d1c2000..8568aa14842 100644
--- a/mysql-test/suite/rpl/r/rpl_mdev382.result
+++ b/mysql-test/suite/rpl/r/rpl_mdev382.result
@@ -389,7 +389,7 @@ use `ts``et`/*!*/;
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/suite/rpl/r/rpl_not_null_innodb.result b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result
index 2d53a525f2c..f7ff0b279e3 100644
--- a/mysql-test/suite/rpl/r/rpl_not_null_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_not_null_innodb.result
@@ -19,11 +19,15 @@ CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
`c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
PRIMARY KEY(`a`)) ENGINE=Innodb DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
************* EXECUTION WITH INSERTS *************
connection master;
INSERT INTO t1(a,b,c) VALUES (1, null, 1);
diff --git a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result
index 93c13e9943f..a8cf00b4ba5 100644
--- a/mysql-test/suite/rpl/r/rpl_not_null_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_not_null_myisam.result
@@ -19,11 +19,15 @@ CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
`c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
PRIMARY KEY(`a`)) ENGINE=MyISAM DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
************* EXECUTION WITH INSERTS *************
connection master;
INSERT INTO t1(a,b,c) VALUES (1, null, 1);
diff --git a/mysql-test/suite/rpl/r/rpl_replicate_do.result b/mysql-test/suite/rpl/r/rpl_replicate_do.result
index 115c27d9387..2a0e3ac36dd 100644
--- a/mysql-test/suite/rpl/r/rpl_replicate_do.result
+++ b/mysql-test/suite/rpl/r/rpl_replicate_do.result
@@ -39,8 +39,8 @@ t1
t2
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-trg2 INSERT t2 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1 INSERT t1 set new.b=2 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 INSERT t2 set new.b=2 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
connection slave;
connection slave;
show tables;
@@ -48,7 +48,7 @@ Tables_in_test
t1
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-trg1 INSERT t1 set new.b=2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+trg1 INSERT t1 set new.b=2 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
connection master;
drop trigger trg1;
drop trigger trg2;
diff --git a/mysql-test/suite/rpl/r/rpl_rewrt_db.result b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
index 4ae20824b22..e4db60831bf 100644
--- a/mysql-test/suite/rpl/r/rpl_rewrt_db.result
+++ b/mysql-test/suite/rpl/r/rpl_rewrt_db.result
@@ -25,13 +25,14 @@ create database rewrite;
connection master;
use test;
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;
connection slave;
@@ -44,11 +45,12 @@ a b c d
2003-03-03 2003-03-03 2003-03-03 NULL
connection master;
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
connection slave;
connection slave;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
index ed3035299c1..74b434cf4df 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_2myisam.result
@@ -612,6 +612,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='MYISAM' ;
INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'date_key' at row 1
CREATE TABLE t2 (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -632,6 +633,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='MYISAM' ;
INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'datetime_key' at row 1
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
@@ -639,7 +641,6 @@ DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
-ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
connection slave;
@@ -673,33 +674,33 @@ CREATE TABLE t1 (a bit) ENGINE='MYISAM' ;
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
-INSERT INTO t1 ( a ) VALUES ( 5 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
DELETE FROM t1 WHERE a < 2 LIMIT 4;
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 9 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 9 );
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 8 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 8 );
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
-INSERT INTO t1 ( a ) VALUES ( 4 );
-INSERT INTO t1 ( a ) VALUES ( 3 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 4 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
DELETE FROM t1 WHERE a = 4 LIMIT 7;
-UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9;
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
DELETE FROM t1 WHERE a < 0 LIMIT 5;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8;
DELETE FROM t1 WHERE a < 8 LIMIT 8;
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
DELETE FROM t1 WHERE a < 6 LIMIT 7;
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 7 );
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
DELETE FROM t1 WHERE a = 2 LIMIT 9;
DELETE FROM t1 WHERE a = 1 LIMIT 4;
@@ -708,7 +709,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 );
DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3;
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
index 2194d8855d4..5ed2365f0a6 100644
--- a/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_basic_3innodb.result
@@ -617,6 +617,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='INNODB' ;
INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'date_key' at row 1
CREATE TABLE t2 (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -637,6 +638,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='INNODB' ;
INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'datetime_key' at row 1
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
@@ -644,7 +646,6 @@ DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
-ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
connection slave;
@@ -681,33 +682,33 @@ CREATE TABLE t1 (a bit) ENGINE='INNODB' ;
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
-INSERT INTO t1 ( a ) VALUES ( 5 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
DELETE FROM t1 WHERE a < 2 LIMIT 4;
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 9 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 9 );
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 8 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 8 );
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
-INSERT INTO t1 ( a ) VALUES ( 4 );
-INSERT INTO t1 ( a ) VALUES ( 3 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 4 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
DELETE FROM t1 WHERE a = 4 LIMIT 7;
-UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9;
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
DELETE FROM t1 WHERE a < 0 LIMIT 5;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8;
DELETE FROM t1 WHERE a < 8 LIMIT 8;
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
DELETE FROM t1 WHERE a < 6 LIMIT 7;
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 7 );
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
DELETE FROM t1 WHERE a = 2 LIMIT 9;
DELETE FROM t1 WHERE a = 1 LIMIT 4;
@@ -716,7 +717,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 );
DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3;
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
include/diff_tables.inc [master:t1, slave:t1]
diff --git a/mysql-test/suite/rpl/r/rpl_row_create_select.result b/mysql-test/suite/rpl/r/rpl_row_create_select.result
index 5b37b409b09..976c6ec7232 100644
--- a/mysql-test/suite/rpl/r/rpl_row_create_select.result
+++ b/mysql-test/suite/rpl/r/rpl_row_create_select.result
@@ -7,17 +7,21 @@ include/master-slave.inc
connection master;
#After the patch, the display width is set to a default
#value of 21.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` bigint(21) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a;
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: 'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
Table Create Table
t2 CREATE TABLE `t2` (
diff --git a/mysql-test/suite/rpl/r/rpl_row_func002.result b/mysql-test/suite/rpl/r/rpl_row_func002.result
index e8d92a94473..20767e28ab4 100644
--- a/mysql-test/suite/rpl/r/rpl_row_func002.result
+++ b/mysql-test/suite/rpl/r/rpl_row_func002.result
@@ -4,8 +4,12 @@ connection master;
DROP FUNCTION test.f1;
DROP TABLE IF EXISTS test.t1;
DROP TABLE IF EXISTS test.t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
+SET sql_mode = DEFAULT;
create function test.f1() RETURNS TIMESTAMP
BEGIN
UPDATE test.t1 SET t = CURRENT_TIMESTAMP;
diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
index ef40fd311d3..a558e113c77 100644
--- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
+++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_innodb.result
@@ -6,7 +6,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
@@ -19,7 +19,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
index 84d68bb2b58..915cf030e06 100644
--- a/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
+++ b/mysql-test/suite/rpl/r/rpl_row_rec_comp_myisam.result
@@ -19,7 +19,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
@@ -32,7 +32,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=MyISAM DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
diff --git a/mysql-test/suite/rpl/r/rpl_sp_effects.result b/mysql-test/suite/rpl/r/rpl_sp_effects.result
index 31234a8101f..d7b3bfef3b3 100644
--- a/mysql-test/suite/rpl/r/rpl_sp_effects.result
+++ b/mysql-test/suite/rpl/r/rpl_sp_effects.result
@@ -271,11 +271,13 @@ call sp_bug26199('\0');
select sf_bug26199(b'1111111');
sf_bug26199(b'1111111')
0
+set sql_mode = '';
select sf_bug26199(b'101111111');
sf_bug26199(b'101111111')
0
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
+set sql_mode = default;
select sf_bug26199('\'');
sf_bug26199('\'')
0
diff --git a/mysql-test/suite/rpl/r/rpl_stm_000001.result b/mysql-test/suite/rpl/r/rpl_stm_000001.result
index b8a14b380db..5680d22f233 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_000001.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_000001.result
@@ -78,7 +78,7 @@ connection master1;
drop table t1;
create table t1 (n int);
insert into t1 values(3456);
-insert into mysql.user (Host, User, Password)
+insert ignore into mysql.user (Host, User, Password)
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
Warnings:
Warning 1364 Field 'ssl_cipher' doesn't have a default value
diff --git a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result
index 5f31cff94cf..cb2120523b2 100644
--- a/mysql-test/suite/rpl/r/rpl_stm_user_variables.result
+++ b/mysql-test/suite/rpl/r/rpl_stm_user_variables.result
@@ -18,7 +18,7 @@ CREATE TABLE t1 (`tinyint` TINYINT,
`decimal` DECIMAL(30,2)) ENGINE = MyISAM;
### insert max unsigned
### a) declarative
-INSERT INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
+INSERT IGNORE INTO t1 VALUES (18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615,18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615, 18446744073709551615);;
#########################################
SELECT * FROM t1;
tinyint 127
@@ -58,7 +58,7 @@ include/diff_tables.inc [master:t1,slave:t1]
connection master;
TRUNCATE t1;
### b) user var
-INSERT INTO t1 VALUES (@positive,
+INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -112,7 +112,7 @@ connection master;
TRUNCATE t1;
### insert min signed
### a) declarative
-INSERT INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
+INSERT IGNORE INTO t1 VALUES (-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808,-9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808, -9223372036854775808);;
#########################################
SELECT * FROM t1;
tinyint -128
@@ -152,7 +152,7 @@ include/diff_tables.inc [master:t1,slave:t1]
connection master;
TRUNCATE t1;
### b) user var
-INSERT INTO t1 VALUES (@negative,
+INSERT IGNORE INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@@ -210,12 +210,14 @@ DROP TABLE t1;
connection slave;
include/rpl_reset.inc
connection master;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM;
CREATE TRIGGER tr1 AFTER INSERT ON t1 FOR EACH ROW SET @aux = -1 ;
SET @aux = 10294947273192243200;
SET @aux1= @aux;
INSERT INTO t1 VALUES (@aux) , (@aux1);
ERROR 23000: Duplicate entry '2147483647' for key 'PRIMARY'
+SET sql_mode = DEFAULT;
connection slave;
## assertion: master and slave tables are in sync
include/diff_tables.inc [master:t1,slave:t1]
diff --git a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
index d82f02ccd9f..69517dafaac 100644
--- a/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
+++ b/mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result
@@ -135,11 +135,13 @@ insert into t1 values(concat("for_23_",UUID()));
insert into t1 select "yesterday_24_";
create table t2 ENGINE=MyISAM select rpad(UUID(),100,' ');
create table t3 select 1 union select UUID();
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t4 select * from t1 where 3 in (select 1 union select 2 union select UUID() union select 3);
create table t5 select * from t1 where 3 in (select 1 union select 2 union select curdate() union select 3);
Warnings:
Warning 1292 Incorrect datetime value: '3'
insert into t5 select UUID() from t1 where 3 in (select 1 union select 2 union select 3 union select * from t4);
+SET sql_mode = DEFAULT;
create procedure foo()
begin
insert into t1 values("work_25_");
diff --git a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
index 23e1813d3ff..24d7d6cebf7 100644
--- a/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
+++ b/mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result
@@ -119,12 +119,12 @@ master-bin.000001 # Query # # COMMIT
BEGIN;
DROP TEMPORARY TABLE t1;
# The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
-INSERT INTO t1 VALUES(uuid()+0);
+INSERT IGNORE INTO t1 VALUES(uuid()+0);
COMMIT;
include/show_binlog_events.inc
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 # Gtid # # BEGIN GTID #-#-#
-master-bin.000001 # Annotate_rows # # INSERT INTO t1 VALUES(uuid()+0)
+master-bin.000001 # Annotate_rows # # INSERT IGNORE INTO t1 VALUES(uuid()+0)
master-bin.000001 # Table_map # # table_id: # (test.t1)
master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
master-bin.000001 # Query # # COMMIT
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result b/mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result
index d61255c00a3..bef60a85e4c 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_format_default_to_default.result
@@ -19,6 +19,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -29,6 +30,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result
index 9f8f409e70e..adbd5475653 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mariadb53.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result
index 5c518163cdd..138e4524952 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_format_mariadb53_to_mysql56.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result b/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result
index 9d086d340f4..7fa82da4618 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mariadb53.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result b/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result
index 22783d4c239..286634ba344 100644
--- a/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result
+++ b/mysql-test/suite/rpl/r/rpl_temporal_format_mysql56_to_mysql56.result
@@ -23,6 +23,7 @@ c4 TIME(4),
c5 TIME(5),
c6 TIME(6)
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
c0 TIMESTAMP(0),
@@ -33,6 +34,7 @@ c4 TIMESTAMP(4),
c5 TIMESTAMP(5),
c6 TIMESTAMP(6)
);
+SET sql_mode = DEFAULT;
CREATE TABLE t3
(
c0 DATETIME(0),
diff --git a/mysql-test/suite/rpl/r/rpl_temporary.result b/mysql-test/suite/rpl/r/rpl_temporary.result
index 37f13c8afb0..e2999cdd225 100644
--- a/mysql-test/suite/rpl/r/rpl_temporary.result
+++ b/mysql-test/suite/rpl/r/rpl_temporary.result
@@ -17,7 +17,7 @@ connection slave;
connection master;
DROP TABLE IF EXISTS t1;
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam;
-INSERT INTO `t1` set `a`=128,`b`='128';
+INSERT IGNORE INTO `t1` set `a`=128,`b`='128';
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1265 Data truncated for column 'b' at row 1
@@ -25,7 +25,7 @@ connection slave;
include/stop_slave.inc
include/start_slave.inc
connection master;
-INSERT INTO `t1` set `a`=128,`b`='128';
+INSERT IGNORE INTO `t1` set `a`=128,`b`='128';
Warnings:
Warning 1264 Out of range value for column 'a' at row 1
Warning 1265 Data truncated for column 'b' at row 1
diff --git a/mysql-test/suite/rpl/r/rpl_timezone.result b/mysql-test/suite/rpl/r/rpl_timezone.result
index b9b890443eb..dcf2c25723a 100644
--- a/mysql-test/suite/rpl/r/rpl_timezone.result
+++ b/mysql-test/suite/rpl/r/rpl_timezone.result
@@ -45,7 +45,7 @@ connection master;
connection master;
delete from t1;
set time_zone='UTC';
-load data infile '../../std_data/rpl_timezone2.dat' into table t1;
+load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1;
Warnings:
Warning 1265 Data truncated for column 't' at row 1
Warning 1261 Row 1 doesn't contain data for all columns
@@ -125,7 +125,7 @@ connection master;
CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
-UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
+UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
Warnings:
Warning 1264 Out of range value for column 'b' at row 1
SELECT * FROM t1 ORDER BY a;
diff --git a/mysql-test/suite/rpl/r/rpl_trigger.result b/mysql-test/suite/rpl/r/rpl_trigger.result
index dcf0c70ffc4..6790a87646d 100644
--- a/mysql-test/suite/rpl/r/rpl_trigger.result
+++ b/mysql-test/suite/rpl/r/rpl_trigger.result
@@ -1127,9 +1127,9 @@ before insert on t1
for each row follows tr1 set NEW.b := (NEW.b+1)*3;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 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
+tr2 INSERT t1 set NEW.b := (NEW.b+1)*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
+tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 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
insert into t1 values (1,1);
select * from t1;
a b
@@ -1137,9 +1137,9 @@ a b
connection slave;
show triggers;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-tr2 INSERT t1 set NEW.b := (NEW.b+1)*3 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
-tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr1 INSERT t1 set NEW.b := (NEW.b+1)*2 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
+tr2 INSERT t1 set NEW.b := (NEW.b+1)*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
+tr3 INSERT t1 set NEW.b := (NEW.b+1)*4 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 t1;
a b
1 64
@@ -1151,11 +1151,11 @@ CREATE OR REPLACE TRIGGER tr BEFORE DELETE ON t1 FOR EACH ROW PRECEDES non_exist
ERROR HY000: Referenced trigger 'non_existing_trigger' 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
-tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr 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
connection slave;
SHOW TRIGGERS;
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
-tr INSERT t1 SET @a=1 BEFORE # NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION root@localhost latin1 latin1_swedish_ci latin1_swedish_ci
+tr 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
connection master;
drop table t1;
include/rpl_end.inc
diff --git a/mysql-test/suite/rpl/t/rpl_bug31076.test b/mysql-test/suite/rpl/t/rpl_bug31076.test
index 4e9517fbf2a..5c9af215863 100644
--- a/mysql-test/suite/rpl/t/rpl_bug31076.test
+++ b/mysql-test/suite/rpl/t/rpl_bug31076.test
@@ -7,6 +7,7 @@ SET GLOBAL SLAVE_TYPE_CONVERSIONS = 'ALL_NON_LOSSY';
CREATE DATABASE track;
USE track;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `visits` (
`visits_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`myid` varchar(32) NOT NULL DEFAULT '',
@@ -26,6 +27,7 @@ CREATE TABLE `visits` (
KEY `time` (`time`),
KEY `user_id` (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=21293381 DEFAULT CHARSET=latin1;
+SET sql_mode = DEFAULT;
CREATE TABLE `visits_events` (
`event_id` mediumint(8) unsigned NOT NULL DEFAULT '0',
diff --git a/mysql-test/suite/rpl/t/rpl_concurrency_error.test b/mysql-test/suite/rpl/t/rpl_concurrency_error.test
index 15d5d5502a1..37a05064641 100644
--- a/mysql-test/suite/rpl/t/rpl_concurrency_error.test
+++ b/mysql-test/suite/rpl/t/rpl_concurrency_error.test
@@ -75,7 +75,7 @@ while ($type)
SET AUTOCOMMIT = 0;
}
--error ER_LOCK_WAIT_TIMEOUT
- eval UPDATE t SET f = 'magenta $type' WHERE f = 'red';
+ eval UPDATE IGNORE t SET f = 'magenta $type' WHERE f = 'red';
eval INSERT INTO t VALUES (5 + ($type * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
@@ -110,7 +110,7 @@ while ($type)
SET AUTOCOMMIT = 0;
}
--error ER_LOCK_WAIT_TIMEOUT
- eval UPDATE t SET f = 'dark blue $type' WHERE f = 'red';
+ eval UPDATE IGNORE t SET f = 'dark blue $type' WHERE f = 'red';
eval INSERT INTO t VALUES (6 + ($type * 10),"brown");
INSERT INTO n VALUES (now(),"brown");
diff --git a/mysql-test/suite/rpl/t/rpl_function_defaults.test b/mysql-test/suite/rpl/t/rpl_function_defaults.test
index f24132994cc..31aef99364c 100644
--- a/mysql-test/suite/rpl/t/rpl_function_defaults.test
+++ b/mysql-test/suite/rpl/t/rpl_function_defaults.test
@@ -35,6 +35,7 @@ CREATE TABLE t1 (
INSERT INTO t1 ( o ) VALUES ( 1 );
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
b TIMESTAMP(1) NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP(1),
@@ -52,8 +53,9 @@ CREATE TABLE t2 (
n DATETIME(6) ON UPDATE CURRENT_TIMESTAMP(6),
o INT
);
+SET sql_mode = DEFAULT;
-INSERT INTO t2 ( o ) VALUES ( 1 );
+INSERT IGNORE INTO t2 ( o ) VALUES ( 1 );
--echo sync_slave_with_master
sync_slave_with_master;
diff --git a/mysql-test/suite/rpl/t/rpl_rewrt_db.test b/mysql-test/suite/rpl/t/rpl_rewrt_db.test
index aa488258c3b..235545747fa 100644
--- a/mysql-test/suite/rpl/t/rpl_rewrt_db.test
+++ b/mysql-test/suite/rpl/t/rpl_rewrt_db.test
@@ -34,7 +34,7 @@ create database rewrite;
connection master;
use test;
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 ',';
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
sync_slave_with_master;
@@ -43,7 +43,7 @@ select * from rewrite.t1;
connection master;
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);
sync_slave_with_master;
connection slave;
diff --git a/mysql-test/suite/rpl/t/rpl_row_create_select.test b/mysql-test/suite/rpl/t/rpl_row_create_select.test
index ca270e92d0c..c9544b37371 100644
--- a/mysql-test/suite/rpl/t/rpl_row_create_select.test
+++ b/mysql-test/suite/rpl/t/rpl_row_create_select.test
@@ -11,10 +11,14 @@
connection master;
--echo #After the patch, the display width is set to a default
--echo #value of 21.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REPEAT('A', 1000) DIV 1 AS a;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 AS SELECT CONVERT(REPEAT('A', 255) USING UCS2) DIV 1 AS a;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
--echo #After the patch, no error is reported.
diff --git a/mysql-test/suite/rpl/t/rpl_row_func002.test b/mysql-test/suite/rpl/t/rpl_row_func002.test
index 2f4e3fdd910..b7b4959b146 100644
--- a/mysql-test/suite/rpl/t/rpl_row_func002.test
+++ b/mysql-test/suite/rpl/t/rpl_row_func002.test
@@ -31,8 +31,12 @@ DROP TABLE IF EXISTS test.t2;
# Section 1 test from Peter G. This test changes uses a stored function to update rows and return the timestamp. We change the value of the time stamp on the master to see what is replicated.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE test.t1 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE test.t2 (a INT NOT NULL AUTO_INCREMENT, t TIMESTAMP, t2 TIMESTAMP, PRIMARY KEY(a));
+SET sql_mode = DEFAULT;
delimiter //;
create function test.f1() RETURNS TIMESTAMP
diff --git a/mysql-test/suite/rpl/t/rpl_sp_effects.test b/mysql-test/suite/rpl/t/rpl_sp_effects.test
index b9d637320bb..aa073b3cc76 100644
--- a/mysql-test/suite/rpl/t/rpl_sp_effects.test
+++ b/mysql-test/suite/rpl/t/rpl_sp_effects.test
@@ -239,7 +239,9 @@ DELIMITER ;//
call sp_bug26199(b'1110');
call sp_bug26199('\0');
select sf_bug26199(b'1111111');
+set sql_mode = '';
select sf_bug26199(b'101111111');
+set sql_mode = default;
select sf_bug26199('\'');
select hex(b) from t2;
diff --git a/mysql-test/suite/rpl/t/rpl_stm_000001.test b/mysql-test/suite/rpl/t/rpl_stm_000001.test
index 3a87a8f1ef9..7e8f669ff34 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_000001.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_000001.test
@@ -113,7 +113,7 @@ connection master1;
drop table t1;
create table t1 (n int);
insert into t1 values(3456);
-insert into mysql.user (Host, User, Password)
+insert ignore into mysql.user (Host, User, Password)
VALUES ("10.10.10.%", "blafasel2", password("blafasel2"));
select select_priv,user from mysql.user where user = _binary'blafasel2';
update mysql.user set Select_priv = "Y" where User= _binary"blafasel2";
diff --git a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test
index 74e54f9624d..493ea4cd967 100644
--- a/mysql-test/suite/rpl/t/rpl_stm_user_variables.test
+++ b/mysql-test/suite/rpl/t/rpl_stm_user_variables.test
@@ -32,7 +32,7 @@ CREATE TABLE t1 (`tinyint` TINYINT,
-- echo ### insert max unsigned
-- echo ### a) declarative
--- eval INSERT INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
+-- eval INSERT IGNORE INTO t1 VALUES ($max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long,$max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long, $max_unsigned_long);
-- echo #########################################
-- query_vertical SELECT * FROM t1
@@ -47,7 +47,7 @@ CREATE TABLE t1 (`tinyint` TINYINT,
TRUNCATE t1;
-- echo ### b) user var
-INSERT INTO t1 VALUES (@positive,
+INSERT IGNORE INTO t1 VALUES (@positive,
@positive,
@positive,
@positive,
@@ -77,7 +77,7 @@ TRUNCATE t1;
-- echo ### insert min signed
-- echo ### a) declarative
--- eval INSERT INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
+-- eval INSERT IGNORE INTO t1 VALUES ($min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long,$min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long, $min_signed_long);
-- echo #########################################
-- query_vertical SELECT * FROM t1
@@ -92,7 +92,7 @@ TRUNCATE t1;
TRUNCATE t1;
-- echo ### b) user var
-INSERT INTO t1 VALUES (@negative,
+INSERT IGNORE INTO t1 VALUES (@negative,
@negative,
@negative,
@negative,
@@ -135,7 +135,7 @@ DROP TABLE t1;
#####################################################################
--source include/rpl_reset.inc
-- connection master
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( c INT, PRIMARY KEY (c)) Engine=MyISAM;
# offending trigger that would reset the unsigned flag for aux before
@@ -146,6 +146,7 @@ SET @aux = 10294947273192243200;
SET @aux1= @aux;
-- error ER_DUP_ENTRY
INSERT INTO t1 VALUES (@aux) , (@aux1);
+SET sql_mode = DEFAULT;
-- sync_slave_with_master
diff --git a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
index fa611538aed..070e5189949 100644
--- a/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
+++ b/mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test
@@ -187,7 +187,7 @@ DROP TEMPORARY TABLE t1;
--echo # The rows event will binlogged after 'INSERT INTO t1 VALUES(1)'
--disable_warnings
-INSERT INTO t1 VALUES(uuid()+0);
+INSERT IGNORE INTO t1 VALUES(uuid()+0);
--enable_warnings
COMMIT;
diff --git a/mysql-test/suite/rpl/t/rpl_temporary.test b/mysql-test/suite/rpl/t/rpl_temporary.test
index e3f5a0be573..729f275bb0d 100644
--- a/mysql-test/suite/rpl/t/rpl_temporary.test
+++ b/mysql-test/suite/rpl/t/rpl_temporary.test
@@ -80,7 +80,7 @@ disable_warnings;
DROP TABLE IF EXISTS t1;
enable_warnings;
CREATE TEMPORARY TABLE `t1`(`a` tinyint,`b` char(1))engine=myisam;
-INSERT INTO `t1` set `a`=128,`b`='128';
+INSERT IGNORE INTO `t1` set `a`=128,`b`='128';
sync_slave_with_master;
@@ -88,7 +88,7 @@ source include/stop_slave.inc;
source include/start_slave.inc;
connection master;
-INSERT INTO `t1` set `a`=128,`b`='128';
+INSERT IGNORE INTO `t1` set `a`=128,`b`='128';
sync_slave_with_master;
# cleanup
diff --git a/mysql-test/suite/rpl/t/rpl_timezone.test b/mysql-test/suite/rpl/t/rpl_timezone.test
index 1f0220421ab..5f6cd320a12 100644
--- a/mysql-test/suite/rpl/t/rpl_timezone.test
+++ b/mysql-test/suite/rpl/t/rpl_timezone.test
@@ -71,7 +71,7 @@ connection master;
connection master;
delete from t1;
set time_zone='UTC';
-load data infile '../../std_data/rpl_timezone2.dat' into table t1;
+load data infile '../../std_data/rpl_timezone2.dat' ignore into table t1;
SELECT * FROM t1 ORDER BY n;
sync_slave_with_master;
set time_zone='UTC';
@@ -157,7 +157,7 @@ CREATE TABLE t1 (a INT, b TIMESTAMP);
INSERT INTO t1 VALUES (1, NOW());
SET @@session.time_zone='Japan';
-UPDATE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
+UPDATE IGNORE t1 SET b= '1970-01-01 08:59:59' WHERE a= 1;
SELECT * FROM t1 ORDER BY a;
sync_slave_with_master;
diff --git a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
index 4cf3914e60a..c16f6027f45 100644
--- a/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
+++ b/mysql-test/suite/sys_vars/inc/explicit_defaults_for_timestamp.inc
@@ -19,9 +19,11 @@ if (`SELECT @@explicit_defaults_for_timestamp=1`)
DROP TABLE t1;
}
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -33,9 +35,11 @@ DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT NULL);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -44,9 +48,11 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -55,14 +61,17 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL);
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -72,6 +81,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
index f214e6d7dac..5241b75588b 100644
--- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
+++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_off.result
@@ -14,6 +14,7 @@ t1 CREATE TABLE `t1` (
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP DEFAULT NULL);
ERROR 42000: Invalid default value for 'a'
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -21,6 +22,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -42,6 +44,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -49,6 +52,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -63,6 +67,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -70,6 +75,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -84,6 +90,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
@@ -92,6 +99,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL);
SHOW CREATE TABLE t1;
Table Create Table
@@ -100,6 +108,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -124,6 +133,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
index 5219fd4e9c4..4219bab00d0 100644
--- a/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
+++ b/mysql-test/suite/sys_vars/r/explicit_defaults_for_timestamp_on.result
@@ -19,6 +19,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -26,6 +27,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -47,6 +49,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -54,6 +57,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -68,6 +72,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -75,6 +80,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP NOT NULL DEFAULT '2001-01-01 10:20:30');
SHOW CREATE TABLE t1;
Table Create Table
@@ -89,6 +95,7 @@ t1 CREATE TABLE `t1` (
`a` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NOT NULL);
SHOW CREATE TABLE t1;
Table Create Table
@@ -97,6 +104,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP NULL);
SHOW CREATE TABLE t1;
Table Create Table
@@ -105,6 +113,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NULL DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT '0000-00-00 00:00:00');
SHOW CREATE TABLE t1;
Table Create Table
@@ -129,6 +138,7 @@ t1 CREATE TABLE `t1` (
`b` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = DEFAULT;
CREATE TABLE t1 (a TIMESTAMP,b TIMESTAMP DEFAULT CURRENT_TIMESTAMP);
SHOW CREATE TABLE t1;
Table Create Table
diff --git a/mysql-test/suite/sys_vars/r/slow_query_log_func.result b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
index cccf10a15eb..4b684413ab6 100644
--- a/mysql-test/suite/sys_vars/r/slow_query_log_func.result
+++ b/mysql-test/suite/sys_vars/r/slow_query_log_func.result
@@ -50,7 +50,9 @@ Bug53191 Lock_time in slow log is negative when logging stored routines
TRUNCATE mysql.slow_log;
connect con2,localhost,root,,;
connection default;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c0 INT PRIMARY KEY AUTO_INCREMENT, c1 TIMESTAMP, c2 TIMESTAMP);
+SET sql_mode = DEFAULT;
CREATE FUNCTION f_slow_now() RETURNS TIMESTAMP
BEGIN
DO SLEEP(2);
diff --git a/mysql-test/suite/sys_vars/r/sql_mode_basic.result b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
index b3c76b12b64..300883cb330 100644
--- a/mysql-test/suite/sys_vars/r/sql_mode_basic.result
+++ b/mysql-test/suite/sys_vars/r/sql_mode_basic.result
@@ -1,22 +1,22 @@
SET @global_start_value = @@global.sql_mode;
SELECT @global_start_value;
@global_start_value
-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 @session_start_value = @@session.sql_mode;
SELECT @session_start_value;
@session_start_value
-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
'#--------------------FN_DYNVARS_152_01------------------------#'
SET @@global.sql_mode = ANSI;
SET @@global.sql_mode = DEFAULT;
SELECT @@global.sql_mode;
@@global.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 @@session.sql_mode = ANSI;
SET @@session.sql_mode = DEFAULT;
SELECT @@session.sql_mode;
@@session.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
'#---------------------FN_DYNVARS_152_02-------------------------#'
SET @@global.sql_mode = NULL;
ERROR 42000: Variable 'sql_mode' can't be set to the value of 'NULL'
@@ -420,8 +420,8 @@ ANSI_QUOTES
SET @@global.sql_mode = @global_start_value;
SELECT @@global.sql_mode;
@@global.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 @@session.sql_mode = @session_start_value;
SELECT @@session.sql_mode;
@@session.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
diff --git a/mysql-test/suite/sys_vars/r/sql_warnings_func.result b/mysql-test/suite/sys_vars/r/sql_warnings_func.result
index 91a4e8b28c0..16be59755de 100644
--- a/mysql-test/suite/sys_vars/r/sql_warnings_func.result
+++ b/mysql-test/suite/sys_vars/r/sql_warnings_func.result
@@ -5,17 +5,17 @@ CREATE TEMPORARY TABLE t1(a varchar(5), b varchar(20));
'#-----------------------------FN_DYNVARS_167_01------------#'
SET @@sql_warnings = DEFAULT;
affected rows: 0
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
affected rows: 1
'#-----------------------------FN_DYNVARS_167_02------------------#'
SET @@sql_warnings = 0;
affected rows: 0
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
affected rows: 1
'#-----------------------------FN_DYNVARS_167_03---------------#'
SET @@sql_warnings = 1;
affected rows: 0
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
affected rows: 1
info: Records: 1 Duplicates: 0 Warnings: 1
'#----------------------------FN_DYNVARS_167_04---------------#'
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
index 3dc8aa579d5..9fe04023134 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result
@@ -3609,9 +3609,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_MODE
SESSION_VALUE ANSI_QUOTES
-GLOBAL_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+GLOBAL_VALUE STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFAULT_VALUE STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Sets the sql mode
diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
index 43a571c8ae0..5e8c0f9f6a1 100644
--- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
+++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result
@@ -4351,9 +4351,9 @@ READ_ONLY NO
COMMAND_LINE_ARGUMENT NULL
VARIABLE_NAME SQL_MODE
SESSION_VALUE ANSI_QUOTES
-GLOBAL_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+GLOBAL_VALUE STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
GLOBAL_VALUE_ORIGIN COMPILE-TIME
-DEFAULT_VALUE NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
+DEFAULT_VALUE STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
VARIABLE_SCOPE SESSION
VARIABLE_TYPE SET
VARIABLE_COMMENT Sets the sql mode
diff --git a/mysql-test/suite/sys_vars/t/slow_query_log_func.test b/mysql-test/suite/sys_vars/t/slow_query_log_func.test
index 0c77dbff226..7e44de12baa 100644
--- a/mysql-test/suite/sys_vars/t/slow_query_log_func.test
+++ b/mysql-test/suite/sys_vars/t/slow_query_log_func.test
@@ -69,7 +69,9 @@ TRUNCATE mysql.slow_log;
connect (con2,localhost,root,,);
connection default;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c0 INT PRIMARY KEY AUTO_INCREMENT, c1 TIMESTAMP, c2 TIMESTAMP);
+SET sql_mode = DEFAULT;
delimiter //;
CREATE FUNCTION f_slow_now() RETURNS TIMESTAMP
BEGIN
diff --git a/mysql-test/suite/sys_vars/t/sql_warnings_func.test b/mysql-test/suite/sys_vars/t/sql_warnings_func.test
index 558c5b7d36a..8d6fafd1ed4 100644
--- a/mysql-test/suite/sys_vars/t/sql_warnings_func.test
+++ b/mysql-test/suite/sys_vars/t/sql_warnings_func.test
@@ -42,7 +42,7 @@ CREATE TEMPORARY TABLE t1(a varchar(5), b varchar(20));
#
SET @@sql_warnings = DEFAULT;
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
--echo '#-----------------------------FN_DYNVARS_167_02------------------#'
#
@@ -51,7 +51,7 @@ INSERT INTO t1 VALUES('abcdef', 'val1');
SET @@sql_warnings = 0;
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
--echo '#-----------------------------FN_DYNVARS_167_03---------------#'
#
@@ -60,7 +60,7 @@ INSERT INTO t1 VALUES('abcdef', 'val1');
SET @@sql_warnings = 1;
-INSERT INTO t1 VALUES('abcdef', 'val1');
+INSERT IGNORE INTO t1 VALUES('abcdef', 'val1');
--echo '#----------------------------FN_DYNVARS_167_04---------------#'
diff --git a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
index a7a43aae529..945884b3cd5 100644
--- a/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
+++ b/mysql-test/suite/vcol/inc/vcol_ins_upd.inc
@@ -47,7 +47,7 @@ delete from t1;
select * from t1;
--echo # INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
select * from t1;
delete from t1;
select * from t1;
@@ -73,7 +73,7 @@ select * from t1;
--echo # INSERT INTO tbl_name (<normal+vcols>) VALUES... a non-NULL value is specified
--echo # against vcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
select * from t1;
delete from t1;
select * from t1;
@@ -101,7 +101,7 @@ select a,b,c from t1;
--echo # CREATE new_table ... LIKE old_table
--echo # INSERT INTO new_table SELECT * from old_table
create table t2 like t1;
-insert into t2 select * from t1;
+insert ignore into t2 select * from t1;
select * from t1;
drop table t2;
@@ -110,7 +110,7 @@ drop table t2;
insert into t1 values (1,default,default);
select * from t1;
create table t2 like t1;
-insert into t2 (a,b) select a,b from t1;
+insert ignore into t2 (a,b) select a,b from t1;
select * from t2;
drop table t2;
drop table t1;
@@ -131,7 +131,7 @@ select * from t1;
--echo # UPDATE tbl_name SET vcol=expr WHERE non-vcol=expr
insert into t1 (a) values (1), (2);
select * from t1;
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
select * from t1;
delete from t1;
select * from t1;
@@ -147,7 +147,7 @@ select * from t1;
--echo # UPDATE tbl_name SET vcol=expr WHERE vcol=expr
insert into t1 (a) values (1), (2);
select * from t1;
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
select * from t1;
delete from t1;
select * from t1;
diff --git a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc
index f19bec04c7a..5003056970f 100644
--- a/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc
+++ b/mysql-test/suite/vcol/inc/vcol_supported_sql_funcs.inc
@@ -15,7 +15,9 @@
--enable_warnings
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval create table t1 ($cols);
+SET sql_mode = DEFAULT;
show create table t1;
if ($rows)
{
@@ -24,7 +26,7 @@ if ($rows)
}
if ($rows)
{
- eval insert into t1 values ($values2);
+ eval insert ignore into t1 values ($values2);
dec $rows;
}
if ($rows)
diff --git a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
index f807405d18d..5acea045d0f 100644
--- a/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
+++ b/mysql-test/suite/vcol/inc/vcol_trigger_sp.inc
@@ -152,7 +152,7 @@ DROP TABLE t1,t2;
--echo #
--echo # Examine the number of times triggers are recalculated for updates
--echo #
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -216,10 +216,12 @@ drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
+
--echo #
--echo # Same test, but with virtual keys
--echo #
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -281,3 +283,4 @@ select * from t1;
drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/suite/vcol/r/alter_inplace-9045.result b/mysql-test/suite/vcol/r/alter_inplace-9045.result
index 114fb3e3c06..10e6e2c15e3 100644
--- a/mysql-test/suite/vcol/r/alter_inplace-9045.result
+++ b/mysql-test/suite/vcol/r/alter_inplace-9045.result
@@ -26,9 +26,11 @@ id handle data hash
3 NULL 0 NULL
alter table t1 modify column handle int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported for this operation. Try ALGORITHM=COPY
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify column handle int not null, algorithm=copy;
Warnings:
Warning 1265 Data truncated for column 'handle' at row 3
+SET sql_mode = DEFAULT;
select * from t1;
id handle data hash
1 12 0 c51ce410c124a10e0db5e4b97fc2af39
diff --git a/mysql-test/suite/vcol/r/load_data.result b/mysql-test/suite/vcol/r/load_data.result
index 9769b55ac9a..2432cdd01a0 100644
--- a/mysql-test/suite/vcol/r/load_data.result
+++ b/mysql-test/suite/vcol/r/load_data.result
@@ -3,7 +3,7 @@ insert into t1 values ("a" , "b", 1), ("a" , "b", 2);
create table t2 like t1 ;
alter table t2 add column c4 bigint unsigned as (CONV(LEFT(MD5(concat(c1,c2,c3)), 16), 16, 10)) persistent unique key;
select * into outfile 't1.csv' from t1;
-load data infile 't1.csv' into table t2 ;
+load data infile 't1.csv' ignore into table t2 ;
Warnings:
Warning 1261 Row 1 doesn't contain data for all columns
Warning 1261 Row 2 doesn't contain data for all columns
diff --git a/mysql-test/suite/vcol/r/update.result b/mysql-test/suite/vcol/r/update.result
index 1dd80ae92b4..0069955f504 100644
--- a/mysql-test/suite/vcol/r/update.result
+++ b/mysql-test/suite/vcol/r/update.result
@@ -56,6 +56,7 @@ a b c
drop table t, t2;
create table t1 (a int, b int, c int, d int, e int);
insert t1 values (1,2,3,4,5), (1,2,3,4,5);
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t (a int primary key,
b int, c blob as (b), index (c(57)),
d blob, e blob as (d), index (e(57)))
@@ -65,6 +66,7 @@ Warning 1906 The value specified for generated column 'c' in table 't' ignored
Warning 1906 The value specified for generated column 'e' in table 't' ignored
Warning 1906 The value specified for generated column 'c' in table 't' ignored
Warning 1906 The value specified for generated column 'e' in table 't' ignored
+set sql_mode = DEFAULT;
check table t;
Table Op Msg_type Msg_text
test.t check status OK
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
index e3853156b4d..f45bd8a6b55 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_innodb.result
@@ -23,7 +23,7 @@ delete from t1;
select * from t1;
a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
@@ -63,7 +63,7 @@ select * from t1;
a b c
# INSERT INTO tbl_name (<normal+vcols>) VALUES... a non-NULL value is specified
# against vcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
@@ -105,7 +105,7 @@ a b c
# CREATE new_table ... LIKE old_table
# INSERT INTO new_table SELECT * from old_table
create table t2 like t1;
-insert into t2 select * from t1;
+insert ignore into t2 select * from t1;
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
Warning 1906 The value specified for generated column 'c' in table 't2' ignored
@@ -121,7 +121,7 @@ a b c
2 -2 -2
1 -1 -1
create table t2 like t1;
-insert into t2 (a,b) select a,b from t1;
+insert ignore into t2 (a,b) select a,b from t1;
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
@@ -157,7 +157,7 @@ select * from t1;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1;
@@ -187,7 +187,7 @@ select * from t1;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1;
diff --git a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
index dcf957becae..ef8f3f00e42 100644
--- a/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_ins_upd_myisam.result
@@ -23,7 +23,7 @@ delete from t1;
select * from t1;
a b c
# INSERT INTO tbl_name VALUES... a non-NULL value is specified against vcols
-insert into t1 values (1,2,3);
+insert ignore into t1 values (1,2,3);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
@@ -63,7 +63,7 @@ select * from t1;
a b c
# INSERT INTO tbl_name (<normal+vcols>) VALUES... a non-NULL value is specified
# against vcols
-insert into t1 (a,b) values (1,3), (2,4);
+insert ignore into t1 (a,b) values (1,3), (2,4);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
Warning 1906 The value specified for generated column 'b' in table 't1' ignored
@@ -105,7 +105,7 @@ a b c
# CREATE new_table ... LIKE old_table
# INSERT INTO new_table SELECT * from old_table
create table t2 like t1;
-insert into t2 select * from t1;
+insert ignore into t2 select * from t1;
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
Warning 1906 The value specified for generated column 'c' in table 't2' ignored
@@ -121,7 +121,7 @@ a b c
2 -2 -2
1 -1 -1
create table t2 like t1;
-insert into t2 (a,b) select a,b from t1;
+insert ignore into t2 (a,b) select a,b from t1;
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
@@ -157,7 +157,7 @@ select * from t1;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where a=2;
+update ignore t1 set c=3 where a=2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1;
@@ -187,7 +187,7 @@ select * from t1;
a b c
1 -1 -1
2 -2 -2
-update t1 set c=3 where b=-2;
+update ignore t1 set c=3 where b=-2;
Warnings:
Warning 1906 The value specified for generated column 'c' in table 't1' ignored
select * from t1;
diff --git a/mysql-test/suite/vcol/r/vcol_keys_myisam.result b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
index 078d6cfff1c..24409d88e83 100644
--- a/mysql-test/suite/vcol/r/vcol_keys_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_keys_myisam.result
@@ -360,6 +360,8 @@ vcol_enum SET('','a','b','c','d','e','f','foo','bar') AS (col_enum) VIRTUAL,
UNIQUE(pk),
PRIMARY KEY(pk)
) ENGINE=MyISAM;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD INDEX(col_enum,vcol_int);
ALTER TABLE t1 ADD INDEX(col_year);
+SET sql_mode = DEFAULT;
DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/r/vcol_misc.result b/mysql-test/suite/vcol/r/vcol_misc.result
index a917159249b..79224cedba9 100644
--- a/mysql-test/suite/vcol/r/vcol_misc.result
+++ b/mysql-test/suite/vcol/r/vcol_misc.result
@@ -106,10 +106,10 @@ t2 CREATE TABLE `t2` (
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1,t2;
CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL);
-INSERT INTO t1 VALUES (0,1,0);
+INSERT IGNORE INTO t1 VALUES (0,1,0);
Warnings:
Warning 1906 The value specified for generated column 'v' in table 't1' ignored
-INSERT INTO t1 VALUES (NULL,0,0);
+INSERT IGNORE INTO t1 VALUES (NULL,0,0);
Warnings:
Warning 1906 The value specified for generated column 'v' in table 't1' ignored
SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1;
@@ -182,10 +182,12 @@ a b c
2 3 y
0 1 y,n
drop table t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (tsv) VALUES (DEFAULT);
INSERT DELAYED INTO t1 (tsv) VALUES (DEFAULT);
FLUSH TABLES;
@@ -300,10 +302,10 @@ b varchar(32) latin1_swedish_ci YES NULL #
c int(11) NULL YES NULL VIRTUAL GENERATED #
d varchar(5) latin1_swedish_ci YES NULL STORED GENERATED #
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL);
-UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
+UPDATE IGNORE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
Warnings:
Warning 1906 The value specified for generated column 'd' in table 't1' ignored
-INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
+INSERT IGNORE INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
Warnings:
Warning 1906 The value specified for generated column 'd' in table 't1' ignored
set sql_mode='strict_all_tables';
@@ -342,7 +344,9 @@ t1 CREATE TABLE `t1` (
`b` timestamp GENERATED ALWAYS AS (cast(`a` as datetime)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME, b TIMESTAMP AS (TIMESTAMP(a)),c TIMESTAMP);
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/r/vcol_select_myisam.result b/mysql-test/suite/vcol/r/vcol_select_myisam.result
index 4dee9f4fca6..30d21d6792a 100644
--- a/mysql-test/suite/vcol/r/vcol_select_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_select_myisam.result
@@ -271,7 +271,7 @@ id select_type table type possible_keys key key_len ref rows Extra
CREATE TABLE t1 (b int);
INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154);
CREATE TABLE t2 (a int, b int AS (a) VIRTUAL);
-INSERT INTO t2 VALUES (187,187), (9,9), (187,187);
+INSERT IGNORE INTO t2 VALUES (187,187), (9,9), (187,187);
Warnings:
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
Warning 1906 The value specified for generated column 'b' in table 't2' ignored
diff --git a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
index d6161751fd4..9770ca7e0e3 100644
--- a/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
+++ b/mysql-test/suite/vcol/r/vcol_supported_sql_funcs.result
@@ -4,7 +4,9 @@ SET @@session.storage_engine = 'MyISAM';
#
# ABS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (abs(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -19,7 +21,9 @@ drop table t1;
set sql_warnings = 0;
# ACOS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(acos(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -27,7 +31,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(acos(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1, default);
-insert into t1 values (1.0001,default);
+insert ignore into t1 values (1.0001,default);
insert into t1 values (0,default);
select * from t1;
a b
@@ -38,7 +42,9 @@ drop table t1;
set sql_warnings = 0;
# ASIN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(asin(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -46,7 +52,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(asin(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0.2, default);
-insert into t1 values (1.0001,default);
+insert ignore into t1 values (1.0001,default);
select * from t1;
a b
0.2 0.201358
@@ -55,7 +61,9 @@ drop table t1;
set sql_warnings = 0;
#ATAN
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double, c double as (format(atan(a,b),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -64,7 +72,7 @@ t1 CREATE TABLE `t1` (
`c` double GENERATED ALWAYS AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
-insert into t1 values (format(PI(),6),0,default);
+insert ignore into t1 values (format(PI(),6),0,default);
select * from t1;
a b c
-2 2 -0.785398
@@ -72,7 +80,9 @@ a b c
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, c double as (format(atan(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -80,7 +90,7 @@ t1 CREATE TABLE `t1` (
`c` double GENERATED ALWAYS AS (format(atan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,default);
-insert into t1 values (format(PI(),6),default);
+insert ignore into t1 values (format(PI(),6),default);
select * from t1;
a c
-2 -1.107149
@@ -89,7 +99,9 @@ drop table t1;
set sql_warnings = 0;
# ATAN2
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double, c double as (format(atan2(a,b),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -98,7 +110,7 @@ t1 CREATE TABLE `t1` (
`c` double GENERATED ALWAYS AS (format(atan(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-2,2,default);
-insert into t1 values (format(PI(),6),0,default);
+insert ignore into t1 values (format(PI(),6),0,default);
select * from t1;
a b c
-2 2 -0.785398
@@ -107,7 +119,9 @@ drop table t1;
set sql_warnings = 0;
# CEIL()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b int as (ceil(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -115,7 +129,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (ceiling(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
-insert into t1 values (-1.23,default);
+insert ignore into t1 values (-1.23,default);
select * from t1;
a b
1.23 2
@@ -124,7 +138,9 @@ drop table t1;
set sql_warnings = 0;
# CONV()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b int, c int, d varchar(10) as (conv(a,b,c)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -134,7 +150,7 @@ t1 CREATE TABLE `t1` (
`d` varchar(10) GENERATED ALWAYS AS (conv(`a`,`b`,`c`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a',16,2,default);
-insert into t1 values ('6e',18,8,default);
+insert ignore into t1 values ('6e',18,8,default);
insert into t1 values (-17,10,-18,default);
insert into t1 values (10+'10'+'10'+0xa,10,10,default);
select * from t1;
@@ -147,7 +163,9 @@ drop table t1;
set sql_warnings = 0;
# COS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(cos(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -162,7 +180,9 @@ drop table t1;
set sql_warnings = 0;
# COT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(cot(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -170,7 +190,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(cot(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (12,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
select * from t1;
a b
12 -1.572673
@@ -179,7 +199,9 @@ drop table t1;
set sql_warnings = 0;
# CRC32()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b long as (crc32(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -187,7 +209,7 @@ t1 CREATE TABLE `t1` (
`b` mediumtext GENERATED ALWAYS AS (crc32(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
-insert into t1 values ('mysql',default);
+insert ignore into t1 values ('mysql',default);
select * from t1;
a b
MySQL 3259397556
@@ -196,7 +218,9 @@ drop table t1;
set sql_warnings = 0;
# DEGREES()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(degrees(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -204,7 +228,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(degrees(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
-insert into t1 values (format(PI()/2,6),default);
+insert ignore into t1 values (format(PI()/2,6),default);
select * from t1;
a b
3.141593 180.00002
@@ -213,7 +237,9 @@ drop table t1;
set sql_warnings = 0;
# /
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (a/2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -228,7 +254,9 @@ drop table t1;
set sql_warnings = 0;
# EXP()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(exp(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -236,7 +264,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(exp(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
-insert into t1 values (-2,default);
+insert ignore into t1 values (-2,default);
insert into t1 values (0,default);
select * from t1;
a b
@@ -247,7 +275,9 @@ drop table t1;
set sql_warnings = 0;
# FLOOR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b long as (floor(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -255,7 +285,7 @@ t1 CREATE TABLE `t1` (
`b` mediumtext GENERATED ALWAYS AS (floor(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.23,default);
-insert into t1 values (-1.23,default);
+insert ignore into t1 values (-1.23,default);
select * from t1;
a b
1.23 1
@@ -264,7 +294,9 @@ drop table t1;
set sql_warnings = 0;
# LN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(ln(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -272,16 +304,22 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(ln(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
-insert into t1 values (-2,default);
+insert ignore into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
2 0.693147
-2 NULL
+Warnings:
+Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double, c double as (format(log(a,b),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -290,17 +328,23 @@ t1 CREATE TABLE `t1` (
`c` double GENERATED ALWAYS AS (format(log(`a`,`b`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,65536,default);
-insert into t1 values (10,100,default);
+insert ignore into t1 values (10,100,default);
insert into t1 values (1,100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b c
2 65536 16
10 100 2
1 100 NULL
+Warnings:
+Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(log(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -308,16 +352,22 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(log(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
-insert into t1 values (-2,default);
+insert ignore into t1 values (-2,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
2 0.693147
-2 NULL
+Warnings:
+Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG2()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(log2(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -325,16 +375,22 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(log2(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (65536,default);
-insert into t1 values (-100,default);
+insert ignore into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
65536 16
-100 NULL
+Warnings:
+Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# LOG10()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(log10(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -342,18 +398,24 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(log10(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (2,default);
-insert into t1 values (100,default);
+insert ignore into t1 values (100,default);
insert into t1 values (-100,default);
+Warnings:
+Warning 1365 Division by 0
select * from t1;
a b
2 0.30103
100 2
-100 NULL
+Warnings:
+Warning 1365 Division by 0
drop table t1;
set sql_warnings = 0;
# -
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (a-1));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -368,7 +430,9 @@ drop table t1;
set sql_warnings = 0;
# MOD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (mod(a,10)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -376,7 +440,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (11,default);
+insert ignore into t1 values (11,default);
select * from t1;
a b
1 1
@@ -385,7 +449,9 @@ drop table t1;
set sql_warnings = 0;
# %
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a % 10));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -393,7 +459,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` % 10) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (11,default);
+insert ignore into t1 values (11,default);
select * from t1;
a b
1 1
@@ -402,7 +468,9 @@ drop table t1;
set sql_warnings = 0;
# OCT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b varchar(10) as (oct(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -417,7 +485,9 @@ drop table t1;
set sql_warnings = 0;
# PI()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(PI()*a*a,6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -432,7 +502,9 @@ drop table t1;
set sql_warnings = 0;
# +
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a+1));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -447,7 +519,9 @@ drop table t1;
set sql_warnings = 0;
# POW, POWER
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (pow(a,2)), c int as (power(a,2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -456,7 +530,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (pow(`a`,2)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default,default);
-insert into t1 values (2,default,default);
+insert ignore into t1 values (2,default,default);
select * from t1;
a b c
1 1 1
@@ -465,7 +539,9 @@ drop table t1;
set sql_warnings = 0;
# RADIANS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(radians(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -480,7 +556,9 @@ drop table t1;
set sql_warnings = 0;
# ROUND()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b int as (round(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -488,7 +566,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (round(`a`,0)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1.23,default);
-insert into t1 values (-1.58,default);
+insert ignore into t1 values (-1.58,default);
insert into t1 values (1.58,default);
select * from t1;
a b
@@ -498,7 +576,9 @@ a b
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double, c int as (round(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -507,7 +587,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (round(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.298,1,default);
-insert into t1 values (1.298,0,default);
+insert ignore into t1 values (1.298,0,default);
insert into t1 values (23.298,-1,default);
select * from t1;
a b c
@@ -518,7 +598,9 @@ drop table t1;
set sql_warnings = 0;
# SIGN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b int as (sign(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -526,7 +608,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (sign(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-32,default);
-insert into t1 values (0,default);
+insert ignore into t1 values (0,default);
insert into t1 values (234,default);
select * from t1;
a b
@@ -537,7 +619,9 @@ drop table t1;
set sql_warnings = 0;
# SIN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(sin(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -552,7 +636,9 @@ drop table t1;
set sql_warnings = 0;
# SQRT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(sqrt(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -560,7 +646,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(sqrt(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (4,default);
-insert into t1 values (20,default);
+insert ignore into t1 values (20,default);
insert into t1 values (-16,default);
select * from t1;
a b
@@ -571,7 +657,9 @@ drop table t1;
set sql_warnings = 0;
# TAN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (format(tan(a),6)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -579,7 +667,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (format(tan(`a`),6)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (format(PI(),6),default);
-insert into t1 values (format(PI()+1,6),default);
+insert ignore into t1 values (format(PI()+1,6),default);
select * from t1;
a b
3.141593 0
@@ -588,7 +676,9 @@ drop table t1;
set sql_warnings = 0;
# *
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (a*3));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -596,7 +686,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (`a` * 3) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
insert into t1 values (2,default);
select * from t1;
a b
@@ -607,7 +697,9 @@ drop table t1;
set sql_warnings = 0;
# TRUNCATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (truncate(a,4)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -615,7 +707,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (truncate(`a`,4)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1.223,default);
-insert into t1 values (1.999,default);
+insert ignore into t1 values (1.999,default);
insert into t1 values (1.999,default);
insert into t1 values (122,default);
select * from t1;
@@ -628,7 +720,9 @@ drop table t1;
set sql_warnings = 0;
# Unary -
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b double as (-a));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -636,7 +730,7 @@ t1 CREATE TABLE `t1` (
`b` double GENERATED ALWAYS AS (-`a`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (-1,default);
+insert ignore into t1 values (-1,default);
select * from t1;
a b
1 -1
@@ -648,7 +742,9 @@ set sql_warnings = 0;
#
# ASCII()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a char(2), b int as (ascii(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -656,7 +752,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (ascii(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2',default);
-insert into t1 values (2,default);
+insert ignore into t1 values (2,default);
insert into t1 values ('dx',default);
select * from t1;
a b
@@ -667,7 +763,9 @@ drop table t1;
set sql_warnings = 0;
# BIN()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b varchar(10) as (bin(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -682,7 +780,9 @@ drop table t1;
set sql_warnings = 0;
# BIT_LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b long as (bit_length(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -697,7 +797,9 @@ drop table t1;
set sql_warnings = 0;
# CHAR_LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b long as (char_length(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -712,7 +814,9 @@ drop table t1;
set sql_warnings = 0;
# CHAR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int, c varbinary(10) as (char(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -728,7 +832,9 @@ drop table t1;
set sql_warnings = 0;
# CHARACTER_LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b long as (character_length(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -743,7 +849,9 @@ drop table t1;
set sql_warnings = 0;
# CONCAT_WS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c varchar(20) as (concat_ws(',',a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -759,7 +867,9 @@ drop table t1;
set sql_warnings = 0;
# CONCAT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c varchar(20) as (concat(a,',',b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -775,7 +885,9 @@ drop table t1;
set sql_warnings = 0;
# ELT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c int, d varchar(10) as (elt(c,a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -785,7 +897,7 @@ t1 CREATE TABLE `t1` (
`d` varchar(10) GENERATED ALWAYS AS (elt(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('value1','value2',1,default);
-insert into t1 values ('value1','value2',2,default);
+insert ignore into t1 values ('value1','value2',2,default);
select * from t1;
a b c d
value1 value2 1 value1
@@ -794,7 +906,9 @@ drop table t1;
set sql_warnings = 0;
# EXPORT_SET()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b varchar(10) as (export_set(a,'1','0','',10)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -809,7 +923,9 @@ drop table t1;
set sql_warnings = 0;
# FIELD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c int as (field('aa',a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -818,7 +934,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (field('aa',`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','bb',default);
-insert into t1 values ('bb','aa',default);
+insert ignore into t1 values ('bb','aa',default);
select * from t1;
a b c
aa bb 1
@@ -827,7 +943,9 @@ drop table t1;
set sql_warnings = 0;
# FIND_IN_SET()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c int as (find_in_set(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -836,7 +954,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (find_in_set(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('aa','aa,bb,cc',default);
-insert into t1 values ('aa','bb,aa,cc',default);
+insert ignore into t1 values ('aa','bb,aa,cc',default);
select * from t1;
a b c
aa aa,bb,cc 1
@@ -845,7 +963,9 @@ drop table t1;
set sql_warnings = 0;
# FORMAT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a double, b varchar(20) as (format(a,2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -860,7 +980,9 @@ drop table t1;
set sql_warnings = 0;
# HEX()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b varchar(10) as (hex(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -874,7 +996,9 @@ a b
drop table t1;
set sql_warnings = 0;
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (hex(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -889,7 +1013,9 @@ drop table t1;
set sql_warnings = 0;
# INSERT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c varchar(20) as (insert(a,length(a),length(b),b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -905,7 +1031,9 @@ drop table t1;
set sql_warnings = 0;
# INSTR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c int as (instr(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -914,7 +1042,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (locate(`b`,`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('foobarbar,','bar',default);
-insert into t1 values ('xbar,','foobar',default);
+insert ignore into t1 values ('xbar,','foobar',default);
select * from t1;
a b c
foobarbar, bar 4
@@ -923,7 +1051,9 @@ drop table t1;
set sql_warnings = 0;
# LCASE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (lcase(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -938,7 +1068,9 @@ drop table t1;
set sql_warnings = 0;
# LEFT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(5) as (left(a,5)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -953,7 +1085,9 @@ drop table t1;
set sql_warnings = 0;
# LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b int as (length(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -968,7 +1102,9 @@ drop table t1;
set sql_warnings = 0;
# LIKE
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b bool as (a like 'H%!o' escape '!'));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -976,7 +1112,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` like 'H%!o' escape '!') VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
-insert into t1 values ('MySQL',default);
+insert ignore into t1 values ('MySQL',default);
select * from t1;
a b
Hello 1
@@ -985,7 +1121,9 @@ drop table t1;
set sql_warnings = 0;
# LOCATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (locate('bar',a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1000,7 +1138,9 @@ drop table t1;
set sql_warnings = 0;
# LOWER()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (lower(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1015,7 +1155,9 @@ drop table t1;
set sql_warnings = 0;
# LPAD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (lpad(a,4,' ')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1023,7 +1165,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(10) GENERATED ALWAYS AS (lpad(`a`,4,' ')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('MySQL',default);
-insert into t1 values ('M',default);
+insert ignore into t1 values ('M',default);
select * from t1;
a b
MySQL MySQ
@@ -1032,7 +1174,9 @@ drop table t1;
set sql_warnings = 0;
# LTRIM()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (ltrim(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1040,7 +1184,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(10) GENERATED ALWAYS AS (ltrim(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (' MySQL',default);
-insert into t1 values ('MySQL',default);
+insert ignore into t1 values ('MySQL',default);
select * from t1;
a b
MySQL MySQL
@@ -1049,7 +1193,9 @@ drop table t1;
set sql_warnings = 0;
# MAKE_SET()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c int, d varchar(30) as (make_set(c,a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1059,7 +1205,7 @@ t1 CREATE TABLE `t1` (
`d` varchar(30) GENERATED ALWAYS AS (make_set(`c`,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',1,default);
-insert into t1 values ('a','b',3,default);
+insert ignore into t1 values ('a','b',3,default);
select * from t1;
a b c d
a b 1 a
@@ -1068,7 +1214,9 @@ drop table t1;
set sql_warnings = 0;
# MID()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (mid(a,1,2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1083,7 +1231,9 @@ drop table t1;
set sql_warnings = 0;
# NOT LIKE
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b bool as (a not like 'H%o'));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1091,7 +1241,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` not like 'H%o') VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
-insert into t1 values ('MySQL',default);
+insert ignore into t1 values ('MySQL',default);
select * from t1;
a b
Hello 0
@@ -1100,7 +1250,9 @@ drop table t1;
set sql_warnings = 0;
# NOT REGEXP
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b bool as (a not regexp 'H.+o'));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1108,7 +1260,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (!(`a` regexp 'H.+o')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
-insert into t1 values ('hello',default);
+insert ignore into t1 values ('hello',default);
select * from t1;
a b
Hello 0
@@ -1117,7 +1269,9 @@ drop table t1;
set sql_warnings = 0;
# OCTET_LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b int as (octet_length(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1132,7 +1286,9 @@ drop table t1;
set sql_warnings = 0;
# ORD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b long as (ord(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1147,7 +1303,9 @@ drop table t1;
set sql_warnings = 0;
# POSITION()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (position('bar' in a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1162,7 +1320,9 @@ drop table t1;
set sql_warnings = 0;
# QUOTE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (quote(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1177,7 +1337,9 @@ drop table t1;
set sql_warnings = 0;
# REGEXP()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b bool as (a regexp 'H.+o'));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1185,7 +1347,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` regexp 'H.+o') VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
-insert into t1 values ('hello',default);
+insert ignore into t1 values ('hello',default);
select * from t1;
a b
Hello 1
@@ -1194,7 +1356,9 @@ drop table t1;
set sql_warnings = 0;
# REPEAT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(30) as (repeat(a,3)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1209,7 +1373,9 @@ drop table t1;
set sql_warnings = 0;
# REPLACE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(30) as (replace(a,'aa','bb')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1224,7 +1390,9 @@ drop table t1;
set sql_warnings = 0;
# REVERSE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(30) as (reverse(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1239,7 +1407,9 @@ drop table t1;
set sql_warnings = 0;
# RIGHT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (right(a,4)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1254,7 +1424,9 @@ drop table t1;
set sql_warnings = 0;
# RLIKE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b bool as (a rlike 'H.+o'));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1262,7 +1434,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` regexp 'H.+o') VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello',default);
-insert into t1 values ('MySQL',default);
+insert ignore into t1 values ('MySQL',default);
select * from t1;
a b
Hello 1
@@ -1271,7 +1443,9 @@ drop table t1;
set sql_warnings = 0;
# RPAD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (rpad(a,4,'??')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1286,7 +1460,9 @@ drop table t1;
set sql_warnings = 0;
# RTRIM();
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (rtrim(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1301,7 +1477,9 @@ drop table t1;
set sql_warnings = 0;
# SOUNDEX()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(20) as (soundex(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1316,7 +1494,9 @@ drop table t1;
set sql_warnings = 0;
# SOUNDS LIKE
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a sounds like b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1325,7 +1505,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (soundex(`a`) = soundex(`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello',default);
-insert into t1 values ('Hello','MySQL',default);
+insert ignore into t1 values ('Hello','MySQL',default);
insert into t1 values ('Hello','hello',default);
select * from t1;
a b c
@@ -1336,7 +1516,9 @@ drop table t1;
set sql_warnings = 0;
# SPACE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(5), b varchar(10) as (concat(a,space(5))));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1351,7 +1533,9 @@ drop table t1;
set sql_warnings = 0;
# STRCMP()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(9), b varchar(9), c tinyint(1) as (strcmp(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1360,7 +1544,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (strcmp(`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('Hello','Hello', default);
-insert into t1 values ('Hello','Hello1', default);
+insert ignore into t1 values ('Hello','Hello1', default);
select * from t1;
a b c
Hello Hello 0
@@ -1369,7 +1553,9 @@ drop table t1;
set sql_warnings = 0;
# SUBSTR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(5), b varchar(10) as (substr(a,2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1384,7 +1570,9 @@ drop table t1;
set sql_warnings = 0;
# SUBSTRING_INDEX()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(15), b varchar(10) as (substring_index(a,'.',2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1399,7 +1587,9 @@ drop table t1;
set sql_warnings = 0;
# SUBSTRING()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(5), b varchar(10) as (substring(a from 2 for 2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1414,7 +1604,9 @@ drop table t1;
set sql_warnings = 0;
# TRIM()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(15), b varchar(10) as (trim(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1429,7 +1621,9 @@ drop table t1;
set sql_warnings = 0;
# UCASE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(5), b varchar(10) as (ucase(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1444,7 +1638,9 @@ drop table t1;
set sql_warnings = 0;
# UNHEX()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(15), b varchar(10) as (unhex(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1459,7 +1655,9 @@ drop table t1;
set sql_warnings = 0;
# UPPER()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(5), b varchar(10) as (upper(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1477,7 +1675,9 @@ set sql_warnings = 0;
#
# CASE
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(16) as (case a when NULL then 'asd' when 'b' then 'B' else a end));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1485,7 +1685,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(16) GENERATED ALWAYS AS (case `a` when NULL then 'asd' when 'b' then 'B' else `a` end) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,default);
-insert into t1 values ('b',default);
+insert ignore into t1 values ('b',default);
insert into t1 values ('c',default);
select * from t1;
a b
@@ -1496,7 +1696,9 @@ drop table t1;
set sql_warnings = 0;
# IF
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int, c int as (if(a=1,a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1505,7 +1707,7 @@ t1 CREATE TABLE `t1` (
`c` int(11) GENERATED ALWAYS AS (if(`a` = 1,`a`,`b`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,2,default);
-insert into t1 values (3,4,default);
+insert ignore into t1 values (3,4,default);
select * from t1;
a b c
1 2 1
@@ -1514,7 +1716,9 @@ drop table t1;
set sql_warnings = 0;
# IFNULL
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c varchar(10) as (ifnull(a,'DEFAULT')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1523,7 +1727,7 @@ t1 CREATE TABLE `t1` (
`c` varchar(10) GENERATED ALWAYS AS (ifnull(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (NULL,'adf',default);
-insert into t1 values ('a','adf',default);
+insert ignore into t1 values ('a','adf',default);
select * from t1;
a b c
NULL adf DEFAULT
@@ -1532,7 +1736,9 @@ drop table t1;
set sql_warnings = 0;
# NULLIF
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10) as (nullif(a,'DEFAULT')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1540,7 +1746,7 @@ t1 CREATE TABLE `t1` (
`b` varchar(10) GENERATED ALWAYS AS (nullif(`a`,'DEFAULT')) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('DEFAULT',default);
-insert into t1 values ('a',default);
+insert ignore into t1 values ('a',default);
select * from t1;
a b
DEFAULT NULL
@@ -1552,7 +1758,9 @@ set sql_warnings = 0;
#
# AND, &&
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b bool as (a>0 && a<2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1560,7 +1768,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` > 0 and `a` < 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
select * from t1;
a b
-1 0
@@ -1569,7 +1777,9 @@ drop table t1;
set sql_warnings = 0;
# BETWEEN ... AND ...
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b bool as (a between 0 and 2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1577,7 +1787,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` between 0 and 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
select * from t1;
a b
-1 0
@@ -1586,7 +1796,9 @@ drop table t1;
set sql_warnings = 0;
# BINARY
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varbinary(10) as (binary a));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1594,7 +1806,7 @@ t1 CREATE TABLE `t1` (
`b` varbinary(10) GENERATED ALWAYS AS (cast(`a` as char charset binary)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('11',default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
select * from t1;
a b
11 11
@@ -1603,7 +1815,9 @@ drop table t1;
set sql_warnings = 0;
# &
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a & 5));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1611,7 +1825,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` & 5) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (0,default);
+insert ignore into t1 values (0,default);
select * from t1;
a b
1 1
@@ -1620,7 +1834,9 @@ drop table t1;
set sql_warnings = 0;
# ~
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (~a));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1637,7 +1853,9 @@ drop table t1;
set sql_warnings = 0;
# |
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a | 5));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1645,7 +1863,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` | 5) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (0,default);
+insert ignore into t1 values (0,default);
insert into t1 values (2,default);
select * from t1;
a b
@@ -1656,7 +1874,9 @@ drop table t1;
set sql_warnings = 0;
# ^
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a ^ 5));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1664,7 +1884,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` ^ 5) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (0,default);
+insert ignore into t1 values (0,default);
insert into t1 values (2,default);
select * from t1;
a b
@@ -1675,7 +1895,9 @@ drop table t1;
set sql_warnings = 0;
# DIV
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a div 5));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1683,7 +1905,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` DIV 5) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (7,default);
+insert ignore into t1 values (7,default);
select * from t1;
a b
1 0
@@ -1692,7 +1914,9 @@ drop table t1;
set sql_warnings = 0;
# <=>
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int, c bool as (a <=> b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1701,7 +1925,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` <=> `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,1,default);
-insert into t1 values (NULL,NULL,default);
+insert ignore into t1 values (NULL,NULL,default);
insert into t1 values (1,NULL,default);
select * from t1;
a b c
@@ -1712,7 +1936,9 @@ drop table t1;
set sql_warnings = 0;
# =
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a=b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1721,7 +1947,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` = `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
-insert into t1 values ('a','a',default);
+insert ignore into t1 values ('a','a',default);
select * from t1;
a b c
a b 0
@@ -1730,7 +1956,9 @@ drop table t1;
set sql_warnings = 0;
# >=
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a >= b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1739,7 +1967,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` >= `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
-insert into t1 values ('a','a',default);
+insert ignore into t1 values ('a','a',default);
select * from t1;
a b c
a b 0
@@ -1748,7 +1976,9 @@ drop table t1;
set sql_warnings = 0;
# >
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a > b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1757,7 +1987,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` > `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('a','b',default);
-insert into t1 values ('a','a',default);
+insert ignore into t1 values ('a','a',default);
select * from t1;
a b c
a b 0
@@ -1766,7 +1996,9 @@ drop table t1;
set sql_warnings = 0;
# IS NOT NULL
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b bool as (a is not null));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1774,7 +2006,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` is not null) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (NULL,default);
+insert ignore into t1 values (NULL,default);
select * from t1;
a b
1 1
@@ -1783,7 +2015,9 @@ drop table t1;
set sql_warnings = 0;
# IS NULL
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b bool as (a is null));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1791,7 +2025,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` is null) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (NULL,default);
+insert ignore into t1 values (NULL,default);
select * from t1;
a b
1 0
@@ -1800,7 +2034,9 @@ drop table t1;
set sql_warnings = 0;
# <<
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a << 2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1808,7 +2044,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` << 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (3,default);
+insert ignore into t1 values (3,default);
select * from t1;
a b
1 4
@@ -1817,7 +2053,9 @@ drop table t1;
set sql_warnings = 0;
# <=
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a <= b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1826,7 +2064,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` <= `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
-insert into t1 values ('b','b',default);
+insert ignore into t1 values ('b','b',default);
insert into t1 values ('b','c',default);
select * from t1;
a b c
@@ -1837,7 +2075,9 @@ drop table t1;
set sql_warnings = 0;
# <
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a < b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1846,7 +2086,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` < `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
-insert into t1 values ('b','b',default);
+insert ignore into t1 values ('b','b',default);
insert into t1 values ('b','c',default);
select * from t1;
a b c
@@ -1857,7 +2097,9 @@ drop table t1;
set sql_warnings = 0;
# NOT BETWEEN ... AND ...
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b bool as (a not between 0 and 2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1865,7 +2107,7 @@ t1 CREATE TABLE `t1` (
`b` tinyint(1) GENERATED ALWAYS AS (`a` not between 0 and 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (-1,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
select * from t1;
a b
-1 1
@@ -1874,7 +2116,9 @@ drop table t1;
set sql_warnings = 0;
# <>
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a <> b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1883,7 +2127,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` <> `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
-insert into t1 values ('b','b',default);
+insert ignore into t1 values ('b','b',default);
insert into t1 values ('b','c',default);
select * from t1;
a b c
@@ -1894,7 +2138,9 @@ drop table t1;
set sql_warnings = 0;
# !=
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(10), b varchar(10), c bool as (a != b));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1903,7 +2149,7 @@ t1 CREATE TABLE `t1` (
`c` tinyint(1) GENERATED ALWAYS AS (`a` <> `b`) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('b','a',default);
-insert into t1 values ('b','b',default);
+insert ignore into t1 values ('b','b',default);
insert into t1 values ('b','c',default);
select * from t1;
a b c
@@ -1914,7 +2160,9 @@ drop table t1;
set sql_warnings = 0;
# ||, OR
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a>5 || a<3));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1922,7 +2170,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` > 5 or `a` < 3) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (4,default);
+insert ignore into t1 values (4,default);
select * from t1;
a b
1 1
@@ -1931,7 +2179,9 @@ drop table t1;
set sql_warnings = 0;
# >>
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a >> 2));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1939,7 +2189,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` >> 2) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (8,default);
-insert into t1 values (3,default);
+insert ignore into t1 values (3,default);
select * from t1;
a b
8 2
@@ -1948,7 +2198,9 @@ drop table t1;
set sql_warnings = 0;
# XOR
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (a xor 5));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1956,7 +2208,7 @@ t1 CREATE TABLE `t1` (
`b` int(11) GENERATED ALWAYS AS (`a` xor 5) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (0,default);
-insert into t1 values (1,default);
+insert ignore into t1 values (1,default);
insert into t1 values (2,default);
select * from t1;
a b
@@ -1970,7 +2222,9 @@ set sql_warnings = 0;
#
# ADDDATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (adddate(a,interval 1 month)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -1985,7 +2239,9 @@ drop table t1;
set sql_warnings = 0;
# ADDTIME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (addtime(a,'02:00:00')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2000,7 +2256,9 @@ drop table t1;
set sql_warnings = 0;
# CONVERT_TZ()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (convert_tz(a,'MET','UTC')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2015,7 +2273,9 @@ drop table t1;
set sql_warnings = 0;
# DATE_ADD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (date_add(a,interval 1 month)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2030,7 +2290,9 @@ drop table t1;
set sql_warnings = 0;
# DATE_SUB()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (date_sub(a,interval 1 month)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2045,7 +2307,9 @@ drop table t1;
set sql_warnings = 0;
# DATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (date(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2060,7 +2324,9 @@ drop table t1;
set sql_warnings = 0;
# DATEDIFF()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b long as (datediff(a,'2000-01-01')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2075,7 +2341,9 @@ drop table t1;
set sql_warnings = 0;
# DAY()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (day(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2090,7 +2358,9 @@ drop table t1;
set sql_warnings = 0;
# DAYOFMONTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (dayofmonth(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2105,7 +2375,9 @@ drop table t1;
set sql_warnings = 0;
# DAYOFWEEK()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (dayofweek(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2120,7 +2392,9 @@ drop table t1;
set sql_warnings = 0;
# DAYOFYEAR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (dayofyear(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2135,7 +2409,9 @@ drop table t1;
set sql_warnings = 0;
# EXTRACT
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (extract(year from a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2150,7 +2426,9 @@ drop table t1;
set sql_warnings = 0;
# FROM_DAYS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a long, b datetime as (from_days(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2166,7 +2444,9 @@ set sql_warnings = 0;
# FROM_UNIXTIME()
set time_zone='UTC';
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a long, b datetime as (from_unixtime(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2181,7 +2461,9 @@ drop table t1;
set sql_warnings = 0;
# HOUR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a time, b long as (hour(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2196,7 +2478,9 @@ drop table t1;
set sql_warnings = 0;
# LAST_DAY()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (last_day(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2204,7 +2488,7 @@ t1 CREATE TABLE `t1` (
`b` datetime GENERATED ALWAYS AS (last_day(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2003-02-05',default);
-insert into t1 values ('2003-02-32',default);
+insert ignore into t1 values ('2003-02-32',default);
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
select * from t1;
@@ -2215,7 +2499,9 @@ drop table t1;
set sql_warnings = 0;
# MAKEDATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b datetime as (makedate(a,1)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2230,7 +2516,9 @@ drop table t1;
set sql_warnings = 0;
# MAKETIME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b time as (maketime(a,1,3)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2245,7 +2533,9 @@ drop table t1;
set sql_warnings = 0;
# MICROSECOND()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b long as (microsecond(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2253,7 +2543,7 @@ t1 CREATE TABLE `t1` (
`b` mediumtext GENERATED ALWAYS AS (microsecond(`a`)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values ('2009-12-31 12:00:00.123456',default);
-insert into t1 values ('2009-12-31 23:59:59.000010',default);
+insert ignore into t1 values ('2009-12-31 23:59:59.000010',default);
select * from t1;
a b
2009-12-31 12:00:00 0
@@ -2262,7 +2552,9 @@ drop table t1;
set sql_warnings = 0;
# MINUTE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (minute(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2277,7 +2569,9 @@ drop table t1;
set sql_warnings = 0;
# MONTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (month(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2292,7 +2586,9 @@ drop table t1;
set sql_warnings = 0;
# PERIOD_ADD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (period_add(a,2)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2307,7 +2603,9 @@ drop table t1;
set sql_warnings = 0;
# PERIOD_DIFF()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int, c int as (period_diff(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2323,7 +2621,9 @@ drop table t1;
set sql_warnings = 0;
# QUARTER()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (quarter(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2338,7 +2638,9 @@ drop table t1;
set sql_warnings = 0;
# SEC_TO_TIME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a long, b time as (sec_to_time(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2353,7 +2655,9 @@ drop table t1;
set sql_warnings = 0;
# SECOND()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (second(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2368,7 +2672,9 @@ drop table t1;
set sql_warnings = 0;
# STR_TO_DATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(64), b datetime as (str_to_date(a,'%m/%d/%Y')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2383,7 +2689,9 @@ drop table t1;
set sql_warnings = 0;
# SUBDATE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (subdate(a,interval 1 month)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2398,7 +2706,9 @@ drop table t1;
set sql_warnings = 0;
# SUBTIME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime as (subtime(a,'02:00:00')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2413,7 +2723,9 @@ drop table t1;
set sql_warnings = 0;
# TIME_TO_SEC()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a time, b long as (time_to_sec(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2428,7 +2740,9 @@ drop table t1;
set sql_warnings = 0;
# TIME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b time as (time(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2443,7 +2757,9 @@ drop table t1;
set sql_warnings = 0;
# TIMEDIFF()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b datetime, c long as (timediff(a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2454,12 +2770,14 @@ t1 CREATE TABLE `t1` (
insert into t1 values ('2008-12-31 23:59:59.000001','2008-12-30 01:01:01.000002',default);
select * from t1;
a b c
-2008-12-31 23:59:59 2008-12-30 01:01:01 46:58:58
+2008-12-31 23:59:59 2008-12-30 01:01:01 NULL
drop table t1;
set sql_warnings = 0;
# TIMESTAMP()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b timestamp as (timestamp(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2474,7 +2792,9 @@ drop table t1;
set sql_warnings = 0;
# TIMESTAMPADD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b timestamp as (timestampadd(minute,1,a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2489,7 +2809,9 @@ drop table t1;
set sql_warnings = 0;
# TIMESTAMPDIFF()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a timestamp, b timestamp, c long as (timestampdiff(MONTH, a,b)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2505,7 +2827,9 @@ drop table t1;
set sql_warnings = 0;
# TO_DAYS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b long as (to_days(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2520,7 +2844,9 @@ drop table t1;
set sql_warnings = 0;
# WEEK()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (week(a,0)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2535,7 +2861,9 @@ drop table t1;
set sql_warnings = 0;
# WEEKDAY()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (weekday(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2550,7 +2878,9 @@ drop table t1;
set sql_warnings = 0;
# WEEKOFYEAR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (weekofyear(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2565,7 +2895,9 @@ drop table t1;
set sql_warnings = 0;
# YEAR()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (year(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2580,7 +2912,9 @@ drop table t1;
set sql_warnings = 0;
# YEARWEEK()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b int as (yearweek(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2602,7 +2936,9 @@ set sql_warnings = 0;
#
# CAST()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b long as (cast(a as unsigned)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2610,7 +2946,7 @@ t1 CREATE TABLE `t1` (
`b` mediumtext GENERATED ALWAYS AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (-1,default);
+insert ignore into t1 values (-1,default);
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
select * from t1;
@@ -2623,7 +2959,9 @@ drop table t1;
set sql_warnings = 0;
# Convert()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b long as (convert(a,unsigned)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2631,7 +2969,7 @@ t1 CREATE TABLE `t1` (
`b` mediumtext GENERATED ALWAYS AS (cast(`a` as unsigned)) VIRTUAL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
insert into t1 values (1,default);
-insert into t1 values (-1,default);
+insert ignore into t1 values (-1,default);
Warnings:
Note 1105 Cast to unsigned converted negative integer to it's positive complement
select * from t1;
@@ -2651,7 +2989,9 @@ set sql_warnings = 0;
#
# AES_DECRYPT(), AES_ENCRYPT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (aes_encrypt(aes_decrypt(a,'adf'),'adf')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2666,7 +3006,9 @@ drop table t1;
set sql_warnings = 0;
# BIT_COUNT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int, b int as (bit_count(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2681,7 +3023,9 @@ drop table t1;
set sql_warnings = 0;
# COMPRESS(), UNCOMPRESS()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (uncompress(compress(a))));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2696,7 +3040,9 @@ drop table t1;
set sql_warnings = 0;
# ENCODE(), DECODE()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (decode(encode(a,'abc'),'abc')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2711,7 +3057,9 @@ drop table t1;
set sql_warnings = 0;
# DEFAULT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024) default 'aaa', b varchar(1024) as (ifnull(a,default(a))));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2726,7 +3074,9 @@ drop table t1;
set sql_warnings = 0;
# INET_ATON(), INET_NTOA()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (inet_ntoa(inet_aton(a))));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2741,7 +3091,9 @@ drop table t1;
set sql_warnings = 0;
# MD5()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varbinary(32) as (md5(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2756,7 +3108,9 @@ drop table t1;
set sql_warnings = 0;
# OLD_PASSWORD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (old_password(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2771,7 +3125,9 @@ drop table t1;
set sql_warnings = 0;
# PASSWORD()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (password(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2786,7 +3142,9 @@ drop table t1;
set sql_warnings = 0;
# SHA1()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (sha1(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2801,7 +3159,9 @@ drop table t1;
set sql_warnings = 0;
# SHA()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(1024), b varchar(1024) as (sha(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2816,7 +3176,9 @@ drop table t1;
set sql_warnings = 0;
# UNCOMPRESSED_LENGTH()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a char, b varchar(1024) as (uncompressed_length(compress(repeat(a,30)))));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2831,7 +3193,9 @@ drop table t1;
set sql_warnings = 0;
# MONTHNAME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a date, b varchar(100) as (monthname(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2846,7 +3210,9 @@ drop table t1;
set sql_warnings = 0;
# DAYNAME()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a date, b varchar(100) as (dayname(a)));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2861,7 +3227,9 @@ drop table t1;
set sql_warnings = 0;
# DATE_FORMAT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a date, b varchar(100) as (date_format(a, '%W %a %M %b')));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2876,7 +3244,9 @@ drop table t1;
set sql_warnings = 0;
# CURRENT_USER()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a char, b varchar(32) as (current_user()));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
@@ -2891,7 +3261,9 @@ drop table t1;
set sql_warnings = 0;
# TIME_FORMAT()
set sql_warnings = 1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a datetime, b varchar(10) as (time_format(a,"%d.%m.%Y")));
+SET sql_mode = DEFAULT;
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
index 0a82f1006e7..dae34569d1b 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_innodb.result
@@ -128,6 +128,7 @@ DROP TABLE t1,t2;
#
# Examine the number of times triggers are recalculated for updates
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -215,9 +216,11 @@ a b c blob_a blob_b blob_c
drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
#
# Same test, but with virtual keys
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -304,3 +307,4 @@ a b c blob_a blob_b blob_c
drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
index edafd474286..5cb02f3911c 100644
--- a/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
+++ b/mysql-test/suite/vcol/r/vcol_trigger_sp_myisam.result
@@ -128,6 +128,7 @@ DROP TABLE t1,t2;
#
# Examine the number of times triggers are recalculated for updates
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -215,9 +216,11 @@ a b c blob_a blob_b blob_c
drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
#
# Same test, but with virtual keys
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
a INTEGER UNSIGNED NULL DEFAULT NULL,
b CHAR(10) NULL DEFAULT NULL,
@@ -304,3 +307,4 @@ a b c blob_a blob_b blob_c
drop trigger t1_ins;
drop trigger t1_update;
drop table t1;
+SET sql_mode = DEFAULT;
diff --git a/mysql-test/suite/vcol/t/alter_inplace-9045.test b/mysql-test/suite/vcol/t/alter_inplace-9045.test
index 8f59ba75bce..dd34926b3b7 100644
--- a/mysql-test/suite/vcol/t/alter_inplace-9045.test
+++ b/mysql-test/suite/vcol/t/alter_inplace-9045.test
@@ -19,7 +19,9 @@ alter table t1 modify column hash varchar(32) as (md5(handle+1)) persistent, alg
select * from t1;
--error ER_ALTER_OPERATION_NOT_SUPPORTED
alter table t1 modify column handle int not null, algorithm=inplace;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify column handle int not null, algorithm=copy;
+SET sql_mode = DEFAULT;
select * from t1;
alter table t1 drop index handle, algorithm=inplace;
create index data on t1(data) algorithm=inplace;
diff --git a/mysql-test/suite/vcol/t/load_data.test b/mysql-test/suite/vcol/t/load_data.test
index 4db3c77244e..f4b3b60397e 100644
--- a/mysql-test/suite/vcol/t/load_data.test
+++ b/mysql-test/suite/vcol/t/load_data.test
@@ -6,7 +6,7 @@ insert into t1 values ("a" , "b", 1), ("a" , "b", 2);
create table t2 like t1 ;
alter table t2 add column c4 bigint unsigned as (CONV(LEFT(MD5(concat(c1,c2,c3)), 16), 16, 10)) persistent unique key;
select * into outfile 't1.csv' from t1;
-load data infile 't1.csv' into table t2 ;
+load data infile 't1.csv' ignore into table t2 ;
select * from t2;
insert into t2 (c1,c2,c3) values ("a" , "b", 4);
select * from t2;
diff --git a/mysql-test/suite/vcol/t/update.test b/mysql-test/suite/vcol/t/update.test
index 8326afe214f..5899161dced 100644
--- a/mysql-test/suite/vcol/t/update.test
+++ b/mysql-test/suite/vcol/t/update.test
@@ -72,10 +72,12 @@ drop table t, t2;
#
create table t1 (a int, b int, c int, d int, e int);
insert t1 values (1,2,3,4,5), (1,2,3,4,5);
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t (a int primary key,
b int, c blob as (b), index (c(57)),
d blob, e blob as (d), index (e(57)))
replace select * from t1;
+set sql_mode = DEFAULT;
check table t; select * from t;
update t set a=10, b=1, d=1;
check table t; select * from t;
diff --git a/mysql-test/suite/vcol/t/vcol_keys_myisam.test b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
index 049037216dc..043323e0ce6 100644
--- a/mysql-test/suite/vcol/t/vcol_keys_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_keys_myisam.test
@@ -243,7 +243,9 @@ INSERT INTO t1 (col_date,col_datetime,col_int,col_varchar,col_timestamp,col_bit,
;
--enable_query_log
--disable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD INDEX(col_enum,vcol_int);
ALTER TABLE t1 ADD INDEX(col_year);
+SET sql_mode = DEFAULT;
--enable_warnings
DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/t/vcol_misc.test b/mysql-test/suite/vcol/t/vcol_misc.test
index 2387000c3ef..94d0bd8a555 100644
--- a/mysql-test/suite/vcol/t/vcol_misc.test
+++ b/mysql-test/suite/vcol/t/vcol_misc.test
@@ -120,8 +120,8 @@ DROP TABLE t1,t2;
#
CREATE TABLE t1 (p int, a double NOT NULL, v double AS (ROUND(a,p)) VIRTUAL);
-INSERT INTO t1 VALUES (0,1,0);
-INSERT INTO t1 VALUES (NULL,0,0);
+INSERT IGNORE INTO t1 VALUES (0,1,0);
+INSERT IGNORE INTO t1 VALUES (NULL,0,0);
SELECT a, p, v, ROUND(a,p), ROUND(a,p+NULL) FROM t1;
DROP TABLE t1;
@@ -182,10 +182,15 @@ drop table t1,t2;
# Bug mdev-3938: INSERT DELAYED for a table with virtual columns
#
+#
+# Refer - MDEV-11527: Virtual columns do not get along well with NO_ZERO_DATE
+#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
tsv TIMESTAMP AS (ADDDATE(ts, INTERVAL 1 DAY)) VIRTUAL
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t1 (tsv) VALUES (DEFAULT);
@@ -266,8 +271,8 @@ show columns from t1;
--replace_column 8 #
show full columns from t1;
INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,NULL);
-UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
-INSERT INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
+UPDATE IGNORE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
+INSERT IGNORE INTO `test`.`t1`(`a`,`b`,`c`,`d`) VALUES ( '1','a',NULL,'a');
set sql_mode='strict_all_tables';
--error ER_WARNING_NON_DEFAULT_VALUE_FOR_GENERATED_COLUMN
UPDATE `test`.`t1` SET `d`='b' WHERE `a`='1' AND `b`='a' AND `c`='1' AND `d`='a';
@@ -308,7 +313,9 @@ DROP TABLE t1;
# Make sure that if the first TIMESTAMP column appears to be virtual,
# then no further promotion is done, so the next TIMESTAMP column "c" does not
# get the "DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" attributes.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a DATETIME, b TIMESTAMP AS (TIMESTAMP(a)),c TIMESTAMP);
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/suite/vcol/t/vcol_select_myisam.test b/mysql-test/suite/vcol/t/vcol_select_myisam.test
index c14faba576d..c86ae10a4b3 100644
--- a/mysql-test/suite/vcol/t/vcol_select_myisam.test
+++ b/mysql-test/suite/vcol/t/vcol_select_myisam.test
@@ -57,7 +57,7 @@ CREATE TABLE t1 (b int);
INSERT INTO t1 VALUES (NULL),( 78), (185), (0), (154);
CREATE TABLE t2 (a int, b int AS (a) VIRTUAL);
-INSERT INTO t2 VALUES (187,187), (9,9), (187,187);
+INSERT IGNORE INTO t2 VALUES (187,187), (9,9), (187,187);
EXPLAIN EXTENDED
SELECT * FROM t1 JOIN t2 USING (b);
diff --git a/mysql-test/t/adddate_454.test b/mysql-test/t/adddate_454.test
index 1d69cdc9558..bbb238a1b75 100644
--- a/mysql-test/t/adddate_454.test
+++ b/mysql-test/t/adddate_454.test
@@ -1,6 +1,7 @@
#
# MDEV-454 Addition of a time interval reduces the resulting value
#
+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/t/alias.test b/mysql-test/t/alias.test
index c02ebe2f5ff..29fe96ff50d 100644
--- a/mysql-test/t/alias.test
+++ b/mysql-test/t/alias.test
@@ -2,6 +2,8 @@
DROP TABLE IF EXISTS t1;
--enable_warnings
+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',
@@ -52,6 +54,8 @@ CREATE TABLE t1 (
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/t/alter_table.test b/mysql-test/t/alter_table.test
index 5efbd7c8819..ef383e3ecd8 100644
--- a/mysql-test/t/alter_table.test
+++ b/mysql-test/t/alter_table.test
@@ -19,12 +19,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;
drop table t1;
@@ -268,7 +270,7 @@ drop table if exists t1, t2;
# not null columns for primary keys)
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);
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status like 't1';
alter table t1 modify a int;
@@ -276,7 +278,7 @@ alter table t1 modify a int;
show table status like 't1';
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);
--replace_column 7 X 8 X 9 X 10 X 11 X 12 X 13 X 14 X
show table status like 't1';
drop table t1;
diff --git a/mysql-test/t/auto_increment_ranges.inc b/mysql-test/t/auto_increment_ranges.inc
index 1540be0828e..dc60f07a700 100644
--- a/mysql-test/t/auto_increment_ranges.inc
+++ b/mysql-test/t/auto_increment_ranges.inc
@@ -29,7 +29,7 @@ truncate table t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values($range_max-1),(NULL),(NULL);
truncate table t1;
-eval insert into t1 values($range_max+1);
+eval insert ignore into t1 values($range_max+1);
select * from t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values(NULL);
@@ -60,7 +60,7 @@ truncate table t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values($range_max-1),(NULL),(NULL);
truncate table t1;
-eval insert into t1 values($range_max+1);
+eval insert ignore into t1 values($range_max+1);
select * from t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values(NULL);
@@ -91,7 +91,7 @@ truncate table t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values($range_max-1),(NULL),(NULL);
truncate table t1;
-eval insert into t1 values($range_max+1);
+eval insert ignore into t1 values($range_max+1);
select * from t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values(NULL);
@@ -122,7 +122,7 @@ truncate table t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values($range_max-1),(NULL),(NULL);
truncate table t1;
-eval insert into t1 values($range_max+1);
+eval insert ignore into t1 values($range_max+1);
select * from t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values(NULL);
@@ -153,7 +153,7 @@ truncate table t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values($range_max-1),(NULL),(NULL);
truncate table t1;
-eval insert into t1 values($range_max+1);
+eval insert ignore into t1 values($range_max+1);
select * from t1;
--error HA_ERR_AUTOINC_ERANGE
eval insert into t1 values(NULL);
@@ -222,7 +222,7 @@ DROP TABLE t1;
--echo #
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);
--error HA_ERR_AUTOINC_ERANGE
INSERT INTO t1 VALUES (NULL);
SELECT * FROM t1;
diff --git a/mysql-test/t/bigint.test b/mysql-test/t/bigint.test
index fb18d60edd9..4a529f2b3a8 100644
--- a/mysql-test/t/bigint.test
+++ b/mysql-test/t/bigint.test
@@ -38,7 +38,9 @@ insert into t1 (big) values (-1),(12345678901234567),(9223372036854775807),(1844
select * from t1;
select min(big),max(big),max(big)-1 from t1;
select min(big),max(big),max(big)-1 from t1 group by a;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify big bigint unsigned not null;
+set sql_mode = DEFAULT;
select min(big),max(big),max(big)-1 from t1;
select min(big),max(big),max(big)-1 from t1 group by a;
insert into t1 (big) values (18446744073709551615);
@@ -48,7 +50,9 @@ select min(big),max(big),max(big)-1 from t1 group by a;
alter table t1 add key (big);
select min(big),max(big),max(big)-1 from t1;
select min(big),max(big),max(big)-1 from t1 group by a;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify big bigint not null;
+set sql_mode = DEFAULT;
select * from t1;
select min(big),max(big),max(big)-1 from t1;
select min(big),max(big),max(big)-1 from t1 group by a;
@@ -153,7 +157,7 @@ select * from t1;
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);
select * from t1;
drop table t1;
diff --git a/mysql-test/t/bug13633383.test b/mysql-test/t/bug13633383.test
index e31d4a8c9f6..1a911068830 100644
--- a/mysql-test/t/bug13633383.test
+++ b/mysql-test/t/bug13633383.test
@@ -16,6 +16,7 @@ CREATE TABLE t1 (
`col441` double unsigned DEFAULT NULL
);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (
`a` geometry DEFAULT NULL,
`col460` date DEFAULT NULL,
@@ -27,6 +28,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,
@@ -51,7 +53,7 @@ INSERT INTO t2 VALUES ('\0\0\0\0\0\0\0\0\0\0\0\0k¿À\0\0\0\0\0jø@','2011-02-19'
INSERT INTO t2 VALUES (NULL,'2011-05-14','2012-10-17 04:33:30','2012-01-20','',0000,'2012-05-08 11:06:53','otbywkbfwwtgpfgurtqwgfcwmmntsdxkounuzueoclrpnadghfzmbrh','2012-03-24 21:01:09');
INSERT INTO t2 VALUES ('\0\0\0\0\0\0\06ý¹PVh,;bºö$î°','2012-07-21','2011-11-21 04:23:27','2011-06-18',0x21,0000,'2011-09-10 14:01:05','goybgohrexhfqwerpknkbyiqowvcdpyxvbklkbeeuvfbjtkmontmkmgcjutkjphewnvvobzilamtjqjbtvqgczozqcmvbbzvoxkycsvplfykmzpwljdcromsilspjuoyhxwduymxkymvmijehtutftqmpfpbesonppacogyogjqhyonizbsgzwubzgeoehryqswzkftgzhzssnlstuszpwauxmdhgjcawabnjcynzrrh','2012-11-19 18:30:51');
INSERT INTO t2 VALUES ('\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0À®ÛÀ','2012-09-01','2012-01-20 09:01:34','2011-02-12',0x1FDF59DC65,0000,'2011-07-07 19:48:34','xohwzrslzxbpxdvqfsumavjwwmsdcgczlmxrtxavsqtnpggxesvekbcelnnrxkvvlwqwbydlhwzltwaurkfltafeijstmzueiqddjdxzddymhsungndmojndbspkezvdfhqxijxxrwiolqgnsedenszkiljgropmcbxsjntjmnonnltyiysuejsznuurmonebslawybppziavystrylwunselezpbslmkzggpziffrud','2012-01-19 22:00:00');
-INSERT INTO t2 VALUES ('\0\0\0\0\0\0\0\0\0\0\0\0jø@\0\0\0\0\0\0\0\0','0000-00-00','2012-05-21 09:59:10','2011-04-17',0x02307EDF,0000,'2012-01-20 09:01:34','vjcwlxxeydntegsdqhxgriarmbvzwzwdexcalvacxhilaejpmxdpkuvblukchagzoellbdndelfednqktzobyhjqweqaugqnfikdalmaytyunjqvxcsirhaqnvqsstgrgfscnsemseebdemfditoswccsxthnddzslgjkyujxoqsvzrssymoovqmibcmbboruyxlvopengdqqgqwekrflhvjcpondxivnshvhrnqvfls','2012-09-23 23:54:02');
+INSERT IGNORE INTO t2 VALUES ('\0\0\0\0\0\0\0\0\0\0\0\0jø@\0\0\0\0\0\0\0\0','0000-00-00','2012-05-21 09:59:10','2011-04-17',0x02307EDF,0000,'2012-01-20 09:01:34','vjcwlxxeydntegsdqhxgriarmbvzwzwdexcalvacxhilaejpmxdpkuvblukchagzoellbdndelfednqktzobyhjqweqaugqnfikdalmaytyunjqvxcsirhaqnvqsstgrgfscnsemseebdemfditoswccsxthnddzslgjkyujxoqsvzrssymoovqmibcmbboruyxlvopengdqqgqwekrflhvjcpondxivnshvhrnqvfls','2012-09-23 23:54:02');
INSERT INTO t3 VALUES (11787,'2012-07-24 15:22:50',0x00000000FF,'qbdydwxepydtonqnghurnuntughjwfygzttqwtmfzfbtifjcearpatksofbrfgnaccvapahywhsstdplphrxbcubhktov','2011-08-27 19:28:03',NULL,0x00000000001C);
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index 58f91571ebb..6d097d85f1a 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -174,12 +174,14 @@ select
hex(cast(_latin1'a' AS char(2))) as c5;
select cast(1000 as CHAR(3));
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 select
cast(_latin1'ab' AS char) as c1,
cast(_latin1'a ' AS char) as c2,
cast(_latin1'abc' AS char(2)) as c3,
cast(_latin1'a ' AS char(2)) as c4,
cast(_latin1'a' AS char(2)) as c5;
+set sql_mode = DEFAULT;
select c1,c2,c3,c4,hex(c5) from t1;
show create table t1;
drop table t1;
@@ -194,12 +196,14 @@ select
cast(_koi8r'Æ ' AS nchar(2)) as c4,
cast(_koi8r'Æ' AS nchar(2)) as c5;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 select
cast(_koi8r'ÆÇ' AS nchar) as c1,
cast(_koi8r'Æ ' AS nchar) as c2,
cast(_koi8r'ÆÇÈ' AS nchar(2)) as c3,
cast(_koi8r'Æ ' AS nchar(2)) as c4,
cast(_koi8r'Æ' AS nchar(2)) as c5;
+set sql_mode = DEFAULT;
select * from t1;
show create table t1;
drop table t1;
@@ -421,8 +425,10 @@ DROP TABLE t1;
--echo # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP
--echo #
+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));
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/t/comment_column.test b/mysql-test/t/comment_column.test
index de1c9b8ce47..7582988453b 100644
--- a/mysql-test/t/comment_column.test
+++ b/mysql-test/t/comment_column.test
@@ -60,9 +60,10 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# comment overflow(warning)
ALTER TABLE t1 ADD COLUMN c11 INTEGER COMMENT 'ABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdABCDEfghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
diff --git a/mysql-test/t/comment_index.test b/mysql-test/t/comment_index.test
index 7857d54080e..16ac5014cef 100644
--- a/mysql-test/t/comment_index.test
+++ b/mysql-test/t/comment_index.test
@@ -55,9 +55,10 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# comment overflow(warning)
CREATE INDEX i11 ON t1(c11) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
@@ -65,7 +66,9 @@ let $ENGINE=`select variable_value from information_schema.global_variables wher
--replace_result $ENGINE ENGINE
SHOW CREATE TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ADD INDEX (c13) COMMENT 'abcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcdefghijabcd';
+SET sql_mode = DEFAULT;
SELECT table_comment,char_length(table_comment) FROM information_schema.tables WHERE table_name='t1';
SELECT column_comment,char_length(column_comment) FROM information_schema.columns WHERE table_name='t1';
SELECT comment,index_comment,char_length(index_comment) FROM information_schema.statistics WHERE table_name='t1';
diff --git a/mysql-test/t/create.test b/mysql-test/t/create.test
index 0be9537350b..401920a66e4 100644
--- a/mysql-test/t/create.test
+++ b/mysql-test/t/create.test
@@ -70,7 +70,7 @@ create table t1 (a varchar(5) default 'abcdef');
create table t1 (a varchar(5) default 'abcde');
insert into t1 values();
select * from t1;
---error 1067
+--error ER_DATA_TOO_LONG
alter table t1 alter column a set default 'abcdef';
drop table t1;
@@ -402,7 +402,9 @@ select * from t2;
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;
drop table t1,t2;
@@ -431,8 +433,12 @@ 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'));
create table t3(cenum enum('a','A','a','c','c'), cset set('b','B','b','d','d'));
+set sql_mode = DEFAULT;
+--error ER_DUPLICATED_VALUE_IN_TYPE
+create table t4(cenum enum('a','a'), cset set('b','b'));
drop table t1, t2, t3;
#
@@ -612,11 +618,13 @@ create table t1 (
show create table t1;
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
#--warning 1364
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 ;
+set sql_mode = DEFAULT;
show create table t1;
drop table t1;
@@ -1104,9 +1112,9 @@ DROP TABLE IF EXISTS t3;
--enable_warnings
--echo
-
+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;
--echo
SET sql_mode = NO_ZERO_DATE;
@@ -1731,7 +1739,9 @@ drop table t1;
# MDEV-7050: MySQL#74603 - Assertion `comma_length > 0' failed in mysql_prepare_create_table
#
set @@session.collation_server=filename;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1(a enum('',''));
+set sql_mode = DEFAULT;
drop table t1;
set @@session.collation_server=default;
diff --git a/mysql-test/t/ctype_big5.test b/mysql-test/t/ctype_big5.test
index fe29f769a89..410203c7c86 100644
--- a/mysql-test/t/ctype_big5.test
+++ b/mysql-test/t/ctype_big5.test
@@ -122,7 +122,7 @@ ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
SELECT COUNT(*) FROM t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1 WHERE a<>'?';
#
# Display all characters that have upper or lower case mapping.
diff --git a/mysql-test/t/ctype_cp932_binlog_stm.test b/mysql-test/t/ctype_cp932_binlog_stm.test
index 1b92006c949..78e5725218a 100644
--- a/mysql-test/t/ctype_cp932_binlog_stm.test
+++ b/mysql-test/t/ctype_cp932_binlog_stm.test
@@ -91,13 +91,13 @@ ORDER BY head, tail;
# Populate t1 with Half Width Kana [A1..DF]
#
--disable_warnings
-INSERT t1 (code) SELECT head FROM head
+INSERT IGNORE t1 (code) SELECT head FROM head
WHERE (head BETWEEN 'A1' AND 'DF')
ORDER BY head;
--enable_warnings
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 WHERE a<>'?' AND OCTET_LENGTH(a)=1;
SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2;
diff --git a/mysql-test/t/ctype_eucjpms.test b/mysql-test/t/ctype_eucjpms.test
index bda4cec61cc..c69abc32a03 100644
--- a/mysql-test/t/ctype_eucjpms.test
+++ b/mysql-test/t/ctype_eucjpms.test
@@ -421,13 +421,13 @@ CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0;
# Pupulate JIS-X-0201 range (Half Width Kana)
# Expected valid code range: [8E][A1..DF] (1x63 characters)
#
-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;
#
# Populate JIS-X-0208 range
# Expected valid codes: [A1..FE][A1..FE] (94x94=8836 characters)
#
-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')
@@ -436,14 +436,14 @@ ORDER BY head, tail;
# Populate JIS-X-0212 range
# Expected valid codes [8F][A1..FE][A1..FE] (1x94x94=8836 characters)
#
-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;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 WHERE a<>'';
SELECT COUNT(*) FROM t1 WHERE a<>'' AND a<>'?';
@@ -531,7 +531,7 @@ set collation_connection=eucjpms_bin;
--echo # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence
--echo #
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;
DROP TABLE t1;
--error ER_INVALID_CHARACTER_STRING
@@ -575,7 +575,7 @@ DROP TABLE t1;
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
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;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_euckr.test b/mysql-test/t/ctype_euckr.test
index b0b1569e540..950c60c47e5 100644
--- a/mysql-test/t/ctype_euckr.test
+++ b/mysql-test/t/ctype_euckr.test
@@ -46,12 +46,12 @@ insert into t1 values (0xA17A);
insert into t1 values (0xA181);
insert into t1 values (0xA1FE);
# Insert some invalid characters
-insert into t1 values (0xA140);
-insert into t1 values (0xA15B);
-insert into t1 values (0xA160);
-insert into t1 values (0xA17B);
-insert into t1 values (0xA180);
-insert into t1 values (0xA1FF);
+insert ignore into t1 values (0xA140);
+insert ignore into t1 values (0xA15B);
+insert ignore into t1 values (0xA160);
+insert ignore into t1 values (0xA17B);
+insert ignore into t1 values (0xA180);
+insert ignore into t1 values (0xA1FF);
select hex(s1), hex(convert(s1 using utf8)) from t1 order by binary s1;
drop table t1;
@@ -99,7 +99,7 @@ SELECT s as bad_code FROM t2 WHERE a='?' ORDER BY s;
DELETE FROM t2 WHERE a='?';
ALTER TABLE t2 ADD u VARCHAR(1) CHARACTER SET utf8, ADD a2 VARCHAR(1) CHARACTER SET euckr;
--disable_warnings
-UPDATE t2 SET u=a, a2=u;
+UPDATE IGNORE t2 SET u=a, a2=u;
--enable_warnings
SELECT s as unassigned_code FROM t2 WHERE u='?';
DELETE FROM t2 WHERE u='?';
@@ -144,7 +144,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1 WHERE a<>'?';
#
# Display all characters that have upper or lower case mapping.
diff --git a/mysql-test/t/ctype_gb2312.test b/mysql-test/t/ctype_gb2312.test
index 8f15f72fad5..4489168a163 100644
--- a/mysql-test/t/ctype_gb2312.test
+++ b/mysql-test/t/ctype_gb2312.test
@@ -68,7 +68,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1 WHERE a<>'?';
#
# Display all characters that have upper or lower case mapping.
diff --git a/mysql-test/t/ctype_gbk.test b/mysql-test/t/ctype_gbk.test
index 88bfda46748..360e6864cd0 100644
--- a/mysql-test/t/ctype_gbk.test
+++ b/mysql-test/t/ctype_gbk.test
@@ -42,7 +42,9 @@ DROP TABLE t1;
# it as QUESTION MARK 0x003F and then scan the next
# character, which is a single byte character 0x41.
#
+set sql_mode = '';
select hex(convert(_gbk 0xA14041 using ucs2));
+set sql_mode = default;
# End of 4.1 tests
@@ -103,7 +105,7 @@ WHERE (head BETWEEN '80' AND 'FF') AND (tail BETWEEN '20' AND 'FF')
ORDER BY head, tail;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1 WHERE a<>'?';
#
# Display all characters that have upper or lower case mapping.
@@ -256,7 +258,7 @@ DELETE FROM t3;
--echo # Sequences that start with a tail or a bad byte,
--echo # or end with a bad byte, all should be fixed.
--echo #
-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;
SELECT COUNT(*) FROM t3;
@@ -269,7 +271,7 @@ DELETE FROM t3;
--echo # Sequences that start with an ASCII or an MB2 character,
--echo # followed by a non-ASCII tail, all should be fixed.
--echo #
-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;
@@ -325,7 +327,7 @@ DELETE FROM t3;
--echo # Sequences that start with a tail or a bad byte,
--echo # or have a bad byte, all should be fixed.
--echo #
-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;
SELECT COUNT(*) FROM t3;
@@ -338,7 +340,7 @@ DELETE FROM t3;
--echo # Sequences that start with an ASCII or an MB2 character,
--echo # followed by a pure non-ASCII tail, all should be fixed.
--echo #
-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;
@@ -352,7 +354,7 @@ DELETE FROM t3;
--echo # Sequences that consist of two ASCII or MB2 characters,
--echo # followed by a pure non-ASCII tail, all should be fixed.
--echo #
-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'
@@ -368,7 +370,7 @@ DELETE FROM t3;
--echo # Sequences that consist of two MB2 characters,
--echo # followed by a non-ASCII head or tail, all should be fixed.
--echo #
-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)
@@ -412,7 +414,7 @@ DELETE FROM t3;
#--echo #
#--echo # Other sequences
#--echo #
-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;
SELECT COUNT(*) FROM t3;
SELECT HEX(c),comment FROM t3 WHERE b=c ORDER BY b;
SELECT HEX(c),HEX(b),comment FROM t3 WHERE b<>c ORDER BY b;
@@ -428,8 +430,10 @@ DROP TABLE t1;
--echo #
--echo # MDEV-7661 Unexpected result for: CAST(0xHHHH AS CHAR CHARACTER SET xxx) for incorrect byte sequences
--echo #
+set sql_mode='';
SELECT HEX(CAST(0xA341 AS CHAR CHARACTER SET gb2312));
SELECT HEX(CONVERT(CAST(0xA341 AS CHAR CHARACTER SET gb2312) USING utf8));
+set sql_mode=default;
--echo #
diff --git a/mysql-test/t/ctype_latin1.test b/mysql-test/t/ctype_latin1.test
index 78d5f819f57..d40cc8b459b 100644
--- a/mysql-test/t/ctype_latin1.test
+++ b/mysql-test/t/ctype_latin1.test
@@ -237,7 +237,7 @@ SELECT HEX(CONVERT('Âx' USING utf8));
SELECT HEX(CONVERT('Âx' USING latin1));
SET NAMES utf8;
CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET latin1);
-INSERT INTO t1 VALUES ('Â'),('Â#');
+INSERT IGNORE INTO t1 VALUES ('Â'),('Â#');
SHOW WARNINGS;
SELECT HEX(a),a FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_ldml.test b/mysql-test/t/ctype_ldml.test
index 1d58daa89e4..b79f8daf22e 100644
--- a/mysql-test/t/ctype_ldml.test
+++ b/mysql-test/t/ctype_ldml.test
@@ -120,7 +120,9 @@ DROP TABLE t1;
# Crash happened with a user-defined utf8 collation,
# on attempt to insert a string longer than the column can store.
CREATE TABLE t1 (c1 VARCHAR(10) CHARACTER SET utf8 COLLATE utf8_test_ci);
+SET sql_mode='';
INSERT INTO t1 SELECT REPEAT('a',11);
+SET sql_mode=default;
DROP TABLE t1;
#
diff --git a/mysql-test/t/ctype_many.test b/mysql-test/t/ctype_many.test
index a51ead67eb2..3878a191168 100644
--- a/mysql-test/t/ctype_many.test
+++ b/mysql-test/t/ctype_many.test
@@ -175,7 +175,9 @@ SET CHARACTER SET utf8;
ALTER TABLE t1 ADD ucs2_f CHAR(32) CHARACTER SET ucs2;
--disable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CHANGE ucs2_f ucs2_f CHAR(32) UNICODE NOT NULL;
+SET sql_mode = DEFAULT;
--enable_warnings
INSERT INTO t1 (ucs2_f,comment) VALUES (0x0391,'GREEK CAPIT ALPHA');
@@ -310,7 +312,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;
SELECT HEX(a) FROM t2;
DROP TABLE t1;
DROP TABLE t2;
diff --git a/mysql-test/t/ctype_mb.test b/mysql-test/t/ctype_mb.test
index 6e369e3fa0b..cd5ab503d55 100644
--- a/mysql-test/t/ctype_mb.test
+++ b/mysql-test/t/ctype_mb.test
@@ -10,7 +10,7 @@ SHOW CREATE TABLE t1;
DELETE FROM t1;
ALTER TABLE t1 ADD c3 CHAR(4) CHARACTER SET utf8;
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
+INSERT IGNORE INTO t1 VALUES ('aaaabbbbccccdddd','aaaabbbbccccdddd','aaaabbbbccccdddd');
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_recoding.test b/mysql-test/t/ctype_recoding.test
index 81c04fc9c30..ba2e65b3626 100644
--- a/mysql-test/t/ctype_recoding.test
+++ b/mysql-test/t/ctype_recoding.test
@@ -129,7 +129,7 @@ CREATE TABLE `goodÐÌÏÈÏ` (a int);
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 ('ÊÃÕË','ÊÃÕË');
drop table t1;
#
diff --git a/mysql-test/t/ctype_sjis.test b/mysql-test/t/ctype_sjis.test
index a962f69003d..9a8ce414c14 100644
--- a/mysql-test/t/ctype_sjis.test
+++ b/mysql-test/t/ctype_sjis.test
@@ -140,10 +140,10 @@ ORDER BY head, tail;
#
# Populate Half Width Kana: [A1..DF]
#
-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');
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 WHERE a<>'?' AND OCTET_LENGTH(a)=1;
SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2;
diff --git a/mysql-test/t/ctype_tis620.test b/mysql-test/t/ctype_tis620.test
index 7bc248aec2b..636f552d251 100644
--- a/mysql-test/t/ctype_tis620.test
+++ b/mysql-test/t/ctype_tis620.test
@@ -120,6 +120,7 @@ DROP TABLE t1;
#
# Bug#6608
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(11) NOT NULL auto_increment,
`url` varchar(200) NOT NULL default '',
@@ -138,6 +139,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
diff --git a/mysql-test/t/ctype_ucs.test b/mysql-test/t/ctype_ucs.test
index 5b8c2f74528..cd51bf8a2a2 100644
--- a/mysql-test/t/ctype_ucs.test
+++ b/mysql-test/t/ctype_ucs.test
@@ -413,7 +413,7 @@ SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (Field1 int(10) unsigned default '0');
# this should generate a "Data truncated" warning
-INSERT INTO t1 VALUES ('-1');
+INSERT IGNORE INTO t1 VALUES ('-1');
DROP TABLE t1;
SET NAMES latin1;
@@ -794,7 +794,9 @@ SET NAMES latin1;
--echo #
--echo # Bug #13832953 MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED
--echo #
+SET sql_mode= 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (c1 SET('','') CHARACTER SET ucs2);
+SET sql_mode=DEFAULT;
INSERT INTO t1 VALUES ('');
SELECT COALESCE(c1) FROM t1 ORDER BY 1;
DROP TABLE t1;
@@ -895,9 +897,9 @@ CREATE TABLE t1 (a DECIMAL(2,0));
SET sql_mode='strict_all_tables';
--error ER_WARN_DATA_OUT_OF_RANGE
INSERT INTO t1 VALUES (CONVERT('9e99999999' USING ucs2));
-SET sql_mode=DEFAULT;
-
+SET sql_mode='';
INSERT INTO t1 VALUES (CONVERT('aaa' USING ucs2));
+SET sql_mode=DEFAULT;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_ujis.test b/mysql-test/t/ctype_ujis.test
index 17aa3850219..020afd3b198 100644
--- a/mysql-test/t/ctype_ujis.test
+++ b/mysql-test/t/ctype_ujis.test
@@ -1156,6 +1156,7 @@ SET collation_connection='ujis_bin';
-- source include/ctype_like_escape.inc
-- source include/ctype_like_range_f1f2.inc
+set sql_mode='';
#
# Bugs#15375: Unassigned multibyte codes are broken
# into parts when converting to Unicode.
@@ -1170,6 +1171,7 @@ select hex(convert(_ujis 0xA5FE41 using ucs2));
# convert it as QUESTION MARK 0x003F and then scan
# the next character, which is a single byte character 0x41.
select hex(convert(_ujis 0x8FABF841 using ucs2));
+set sql_mode=default;
# End of 4.1 tests
--disable_warnings
@@ -1254,13 +1256,13 @@ CREATE TABLE t1 AS SELECT 'XXXXXX' AS code, ' ' AS a LIMIT 0;
# Pupulate JIS-X-0201 range (Half Width Kana)
# Valid characters: [8E][A1-DF]
#
-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;
#
# Populate JIS-X-0208 range
# Expected valid range: [A1..FE][A1..FE]
#
-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')
@@ -1269,14 +1271,14 @@ ORDER BY head, tail;
# Populate JIS-X-0212 range
# Expected valid range: [8F][A1..FE][A1..FE]
#
-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;
DROP TEMPORARY TABLE head, tail;
SHOW CREATE TABLE t1;
-UPDATE t1 SET a=unhex(code) ORDER BY code;
+UPDATE IGNORE t1 SET a=unhex(code) ORDER BY code;
SELECT COUNT(*) FROM t1;
SELECT COUNT(*) FROM t1 WHERE a<>'?';
SELECT COUNT(*) FROM t1 WHERE a<>'' AND OCTET_LENGTH(a)=2;
@@ -1361,7 +1363,7 @@ set collation_connection=ujis_bin;
--echo # MDEV-6776 ujis and eucjmps erroneously accept 0x8EA0 as a valid byte sequence
--echo #
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;
DROP TABLE t1;
--error ER_INVALID_CHARACTER_STRING
@@ -1406,7 +1408,7 @@ SELECT HEX(a) FROM t1 ORDER BY a;DROP TABLE t1;
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
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;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_ujis_ucs2.test b/mysql-test/t/ctype_ujis_ucs2.test
index 1a8702b2aa9..8616eea36d1 100644
--- a/mysql-test/t/ctype_ujis_ucs2.test
+++ b/mysql-test/t/ctype_ujis_ucs2.test
@@ -1243,7 +1243,7 @@ update t1 set name='User defined range #2' where ujis >= 0x8FF5A1 and ujis <= 0x
# Other characters are not assigned
update t1 set name='UNASSIGNED' where name='';
-update t1 set ucs2=ujis, ujis2=ucs2;
+update ignore t1 set ucs2=ujis, ujis2=ucs2;
--echo Characters with safe Unicode round trip
select hex(ujis), hex(ucs2), hex(ujis2), name from t1 where ujis=ujis2 order by ujis;
--echo Characters with unsafe Unicode round trip
@@ -1299,7 +1299,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;
select hex(ucs2),hex(ujis),name from t1 order by name;
drop table t1;
diff --git a/mysql-test/t/ctype_utf16.test b/mysql-test/t/ctype_utf16.test
index c986309707e..dcf2ec32361 100644
--- a/mysql-test/t/ctype_utf16.test
+++ b/mysql-test/t/ctype_utf16.test
@@ -570,7 +570,9 @@ 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;
+SET sql_mode = DEFAULT;
select hex(s1) from t1;
drop table t1;
#
@@ -578,7 +580,7 @@ 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;
select hex(s2) from t1;
drop table t1;
@@ -660,7 +662,7 @@ select left('aaa','1');
#
create table t1 (a int);
insert into t1 values ('-1234.1e2');
-insert into t1 values ('-1234.1e2xxxx');
+insert ignore into t1 values ('-1234.1e2xxxx');
insert into t1 values ('-1234.1e2 ');
select * from t1;
drop table t1;
@@ -670,14 +672,16 @@ drop table t1;
#
create table t1 (a int);
insert into t1 values ('1 ');
-insert into t1 values ('1 x');
+insert ignore into t1 values ('1 x');
select * from t1;
drop table t1;
#
# Testing auto-conversion to TEXT
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(17000) character set utf16);
+set sql_mode = default;
show create table t1;
drop table t1;
diff --git a/mysql-test/t/ctype_utf16le.test b/mysql-test/t/ctype_utf16le.test
index 665443bb278..c6589eb24b1 100644
--- a/mysql-test/t/ctype_utf16le.test
+++ b/mysql-test/t/ctype_utf16le.test
@@ -60,7 +60,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');
INSERT INTO t1 VALUES (_utf32 X'010000', 10, _ucs2 X'0421');
INSERT INTO t1 VALUES (_ucs2 X'0421', 10, _utf32 X'010000');
SELECT a, pad, b, LPAD(a, pad, b), HEX(LPAD(a, pad, b)) FROM t1;
@@ -492,7 +492,9 @@ DROP TABLE t1;
--echo #
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;
+SET sql_mode = DEFAULT;
SELECT HEX(s1) FROM t1;
DROP TABLE t1;
@@ -501,7 +503,7 @@ DROP TABLE t1;
--echo #
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;
SELECT HEX(s2) FROM t1;
DROP TABLE t1;
@@ -603,7 +605,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('-1234.1e2');
-INSERT INTO t1 VALUES ('-1234.1e2xxxx');
+INSERT IGNORE INTO t1 VALUES ('-1234.1e2xxxx');
INSERT INTO t1 VALUES ('-1234.1e2 ');
INSERT INTO t1 VALUES ('123');
INSERT INTO t1 VALUES ('-124');
@@ -629,7 +631,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a int);
INSERT INTO t1 VALUES ('1 ');
-INSERT INTO t1 VALUES ('1 x');
+INSERT IGNORE INTO t1 VALUES ('1 x');
SELECT * FROM t1;
DROP TABLE t1;
@@ -637,7 +639,9 @@ DROP TABLE t1;
--echo #
--echo # Testing auto-conversion to TEXT
--echo #
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a VARCHAR(17000) CHARACTER SET utf16le);
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_utf32.test b/mysql-test/t/ctype_utf32.test
index f113f046d42..65657c998de 100644
--- a/mysql-test/t/ctype_utf32.test
+++ b/mysql-test/t/ctype_utf32.test
@@ -598,19 +598,19 @@ drop table t1;
#
create table t1 (utf32 varchar(2) character set utf32);
--echo Wrong character with pad
-insert into t1 values (0x110000);
+insert ignore into t1 values (0x110000);
--echo Wrong chsaracter without pad
-insert into t1 values (0x00110000);
+insert ignore into t1 values (0x00110000);
--echo Wrong character with pad followed by another wrong character
-insert into t1 values (0x11000000110000);
+insert ignore into t1 values (0x11000000110000);
--echo Good character with pad followed by bad character
-insert into t1 values (0x10000000110000);
+insert ignore into t1 values (0x10000000110000);
--echo Good character without pad followed by bad character
-insert into t1 values (0x0010000000110000);
+insert ignore into t1 values (0x0010000000110000);
--echo Wrong character with the second byte higher than 0x10
-insert into t1 values (0x00800037);
+insert ignore into t1 values (0x00800037);
--echo Wrong character with pad with the second byte higher than 0x10
-insert into t1 values (0x00800037);
+insert ignore into t1 values (0x00800037);
drop table t1;
#
@@ -700,7 +700,7 @@ select left('aaa','1');
#
create table t1 (a int);
insert into t1 values ('-1234.1e2');
-insert into t1 values ('-1234.1e2xxxx');
+insert ignore into t1 values ('-1234.1e2xxxx');
insert into t1 values ('-1234.1e2 ');
select * from t1;
drop table t1;
@@ -710,14 +710,16 @@ drop table t1;
#
create table t1 (a int);
insert into t1 values ('1 ');
-insert into t1 values ('1 x');
+insert ignore into t1 values ('1 x');
select * from t1;
drop table t1;
#
# Testing auto-conversion to TEXT
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a varchar(17000) character set utf32);
+set sql_mode = default;
show create table t1;
drop table t1;
@@ -819,10 +821,10 @@ DROP TABLE t1;
--echo #
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;
DELETE FROM t1;
INSERT INTO t1 (utf32) VALUES (0x100cc);
-UPDATE t1 SET latin1 = utf32;
+UPDATE IGNORE t1 SET latin1 = utf32;
DROP TABLE t1;
--echo #
@@ -892,7 +894,9 @@ SELECT CHAR_LENGTH(TRIM(BOTH 0x00 FROM _utf32 0x00000061));
#
# potential signedness issue
#
+SET sql_mode='';
select hex(lower(cast(0xffff0000 as char character set utf32))) as c;
+SET sql_mode=DEFAULT;
--echo #
--echo # MDEV-11685: sql_mode can't be set with non-ascii connection charset
diff --git a/mysql-test/t/ctype_utf8.test b/mysql-test/t/ctype_utf8.test
index ac293399dab..6c5cfba4b36 100644
--- a/mysql-test/t/ctype_utf8.test
+++ b/mysql-test/t/ctype_utf8.test
@@ -128,6 +128,7 @@ set LC_TIME_NAMES='en_US';
# Bug #2366 Wrong utf8 behaviour when data is truncated
#
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8);
insert into t1 values (_koi8r'ÁÂ');
select s1,hex(s1),char_length(s1),octet_length(s1) from t1;
@@ -151,10 +152,12 @@ insert into t1 select repeat('Ña',66000);
insert into t1 select repeat('ÑÑ',66000);
select length(s1),char_length(s1) from t1;
drop table t1;
+set sql_mode=default;
#
# Bug #2368 Multibyte charsets do not check that incoming data is well-formed
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8);
insert into t1 values (0x41FF);
select hex(s1) from t1;
@@ -169,6 +172,7 @@ create table t1 (s1 text character set utf8);
insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
+set sql_mode=default;
#
# Bug 2699
@@ -794,6 +798,7 @@ create table t1 (x enum('A', 'B') default 0) character set utf8;
#
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
@@ -831,13 +836,17 @@ SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
+
#
# Bug#11591: CHAR column with utf8 does not work properly
# (more chars than expected)
#
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;
+set sql_mode = default;
select char_length(a), length(a), a from t1 order by a;
drop table t1;
@@ -1209,6 +1218,7 @@ DROP TABLE t1;
# Bug#20095 Changing length of VARCHAR field with UTF8
# collation does not truncate values
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8;
@@ -1238,6 +1248,7 @@ insert into t1 values (repeat('a',4000));
alter table t1 change a a varchar(3000) character set utf8 not null;
select length(a) from t1;
drop table t1;
+set sql_mode = default;
#
@@ -1245,6 +1256,7 @@ drop table t1;
# Bug#14146: CHAR(...USING ...) and CONVERT(CHAR(...) USING...)
# produce different results
#
+set sql_mode = '';
set names utf8;
# correct value
select hex(char(1 using utf8));
@@ -1261,6 +1273,7 @@ select char(195 using utf8);
select char(196 using utf8);
select char(2557 using utf8);
select convert(char(0xff,0x8f) using utf8);
+set sql_mode = default;
#
# Check convert + char + using
@@ -1428,7 +1441,7 @@ select hex(_utf8 X'616263FF');
select hex(_utf8 B'001111111111');
--error ER_INVALID_CHARACTER_STRING
select (_utf8 X'616263FF');
-set sql_mode=default;
+set sql_mode='';
select hex(char(0xFF using utf8));
select hex(convert(0xFF using utf8));
--error ER_INVALID_CHARACTER_STRING
@@ -1439,6 +1452,7 @@ select hex(_utf8 X'616263FF');
select hex(_utf8 B'001111111111');
--error ER_INVALID_CHARACTER_STRING
select (_utf8 X'616263FF');
+set sql_mode=default;
--echo #
--echo # Bug#44131 Binary-mode "order by" returns records in incorrect order for UTF-8 strings
@@ -1601,8 +1615,9 @@ EXPLAIN EXTENDED SELECT 'abcdÃÂÃÄÅ', _latin1'abcdÃÂÃÄÅ', _utf8'abcdÃÃ
--echo #
--echo # Bug#11750518 41090: ORDER BY TRUNCATES GROUP_CONCAT RESULT
--echo #
-
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
@@ -1615,6 +1630,8 @@ FROM (SELECT 'a' AS id, REPEAT('foo bar', 100) AS body
UNION ALL
SELECT 'a' AS id, REPEAT('bla bla', 100) AS body) t1;
+SET group_concat_max_len = DEFAULT;
+
--echo #
--echo # MDEV-7814 Assertion `args[0]->fixed' fails in Item_func_conv_charset::Item_func_conv_charset
--echo #
@@ -1674,7 +1691,9 @@ SET NAMES utf8;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8);
INSERT INTO t1 VALUES (REPEAT('A',100));
SELECT OCTET_LENGTH(a) FROM t1;
+set sql_mode='NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8;
+set sql_mode=default;
SELECT OCTET_LENGTH(a),a FROM t1;
DROP TABLE t1;
@@ -1706,6 +1725,7 @@ SELECT length(data) AS len FROM (SELECT REPEAT('ä', 65537) AS data) AS sub;
--echo #
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;
SET sql_mode='STRICT_ALL_TABLES';
SELECT HEX(i), HEX(CHAR(i USING utf8)) FROM t1;
@@ -2008,7 +2028,7 @@ DROP TABLE t1;
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
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;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
@@ -2016,7 +2036,7 @@ DROP TABLE t1;
--echo # MDEV-9874 LOAD XML INFILE does not handle well broken multi-byte characters
--echo #
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>';
SELECT HEX(a) FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test
index 55aad5b1454..43f3fc55ef7 100644
--- a/mysql-test/t/ctype_utf8mb4.test
+++ b/mysql-test/t/ctype_utf8mb4.test
@@ -126,6 +126,7 @@ set LC_TIME_NAMES='en_US';
# Bug #2366 Wrong utf8mb4 behaviour when data is truncated
#
set names koi8r;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(1) character set utf8mb4);
insert into t1 values (_koi8r'ÁÂ');
select s1,hex(s1),char_length(s1),octet_length(s1) from t1;
@@ -149,10 +150,12 @@ insert into t1 select repeat('Ña',66000);
insert into t1 select repeat('ÑÑ',66000);
select length(s1),char_length(s1) from t1;
drop table t1;
+set sql_mode = default;
#
# Bug #2368 Multibyte charsets do not check that incoming data is well-formed
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (s1 char(10) character set utf8mb4);
insert into t1 values (0x41FF);
select hex(s1) from t1;
@@ -167,6 +170,7 @@ create table t1 (s1 text character set utf8mb4);
insert into t1 values (0x41FF);
select hex(s1) from t1;
drop table t1;
+set sql_mode = default;
#
# Bug 2699
@@ -811,6 +815,7 @@ create table t1 (x enum('A', 'B') default 0) character set utf8mb4;
#
SET NAMES UTF8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
`id` int(20) NOT NULL auto_increment,
@@ -849,6 +854,7 @@ INSERT INTO t2 VALUES ('1234567890',2,'2005-05-24 13:53:25');
SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
#
# Bug#11591: CHAR column with utf8mb4 does not work properly
@@ -856,7 +862,9 @@ DROP TABLE t1,t2;
#
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;
+set sql_mode = default;
select char_length(a), length(a), a from t1 order by a;
drop table t1;
@@ -1219,6 +1227,7 @@ DROP TABLE t1;
# Bug#20095 Changing length of VARCHAR field with UTF8
# collation does not truncate values
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (
a varchar(26) not null
) default character set utf8mb4;
@@ -1249,6 +1258,7 @@ alter table t1 change a a varchar(3000) character set utf8mb4 not null;
select length(a) from t1;
drop table t1;
+set sql_mode = default;
#
# Bug#10504: Character set does not support traditional mode
@@ -1490,7 +1500,9 @@ create table t1 (utf8mb4 char(1) character set utf8mb4);
--echo Testing [F0][90..BF][80..BF][80..BF]
insert into t1 values (0xF0908080);
insert into t1 values (0xF0BFBFBF);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values (0xF08F8080);
+insert ignore into t1 values (0xF08F8080);
select hex(utf8mb4) from t1;
delete from t1;
@@ -1503,7 +1515,9 @@ delete from t1;
--echo Testing [F4][80..8F][80..BF][80..BF]
insert into t1 values (0xF4808080);
insert into t1 values (0xF48F8080);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
insert into t1 values (0xF4908080);
+insert ignore into t1 values (0xF4908080);
select hex(utf8mb4) from t1;
drop table t1;
@@ -1581,12 +1595,12 @@ INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859
# Mix of 3-byte and 4-byte chars
INSERT INTO t1 VALUES (65131, x'efb9abf09d849ef09d859ef09d859ef09d8480f09d859fefb9abefb9abf09d85a0efb9ab');
# All from musical chars, but 11 instead of 10 chars. truncated
-INSERT INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
+INSERT IGNORE INTO t1 VALUES (119070, x'f09d849ef09d859ef09d859ef09d8480f09d859ff09d859ff09d859ff09d85a0f09d85a0f09d8480f09d85a0');
SELECT u_decimal, hex(utf8mb4_encoding) FROM t1 ORDER BY utf8mb4_encoding COLLATE utf8mb4_general_ci, BINARY utf8mb4_encoding;
# First invalid 4 byte value
-INSERT INTO t1 VALUES (1114111, x'f5808080');
+INSERT IGNORE INTO t1 VALUES (1114111, x'f5808080');
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't1' AND column_name= 'utf8mb4_encoding';
@@ -1603,13 +1617,15 @@ INSERT INTO t2 VALUES (42856, x'ea9da8');
# SMALL COMMERCIAL AT
INSERT INTO t2 VALUES (65131, x'efb9ab');
# <Plane 16 Private Use, Last> (last 4 byte character)
-INSERT INTO t2 VALUES (1114111, x'f48fbfbf');
+INSERT IGNORE INTO t2 VALUES (1114111, x'f48fbfbf');
SELECT character_maximum_length, character_octet_length FROM information_schema.columns WHERE
table_name= 't2' AND column_name= 'utf8mb3_encoding';
# Update a 3-byte char col with a 4-byte char, error
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
UPDATE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
+UPDATE IGNORE t2 SET utf8mb3_encoding= x'f48fbfbd' where u_decimal= 42856;
# Update to a 3-byte char casted to 4-byte, error?
UPDATE t2 SET utf8mb3_encoding= _utf8mb4 x'ea9da8' where u_decimal= 42856;
@@ -1627,7 +1643,9 @@ SELECT count(*) FROM t1, t2
WHERE t1.utf8mb4_encoding > t2.utf8mb3_encoding;
# Alter from 4-byte charset to 3-byte charset, error
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 CONVERT TO CHARACTER SET utf8;
+set sql_mode = default;
SHOW CREATE TABLE t1;
SELECT u_decimal,hex(utf8mb4_encoding),utf8mb4_encoding FROM t1;
@@ -1737,10 +1755,12 @@ CREATE TABLE t1 (
ALTER TABLE t1 ADD INDEX (subject);
# Alter old 'utf8' table to new 'utf8mb4'
+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;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
INSERT INTO t1(subject) VALUES ('abcd');
@@ -1816,7 +1836,9 @@ SET NAMES utf8mb4;
CREATE TABLE t1 (a TEXT CHARACTER SET utf8mb4);
INSERT INTO t1 VALUES (REPEAT('😎',100));
SELECT OCTET_LENGTH(a) FROM t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY a TINYTEXT CHARACTER SET utf8mb4;
+SET sql_mode = DEFAULT;
SELECT OCTET_LENGTH(a),a FROM t1;
DROP TABLE t1;
@@ -1892,7 +1914,9 @@ CREATE TABLE t1 (
a VARCHAR(32) CHARACTER SET utf8mb4,
b VARCHAR(32) CHARACTER SET utf8
);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
INSERT INTO t1 SELECT 'a 😠b', 'a 😠b';
+INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b';
SELECT * FROM t1;
DROP TABLE t1;
@@ -1909,7 +1933,9 @@ CREATE TABLE t1 (
a VARCHAR(32) CHARACTER SET utf8mb4,
b VARCHAR(32) CHARACTER SET utf8
);
+--error ER_TRUNCATED_WRONG_VALUE_FOR_FIELD
INSERT INTO t1 SELECT 'a 😠b', 'a 😠b';
+INSERT IGNORE INTO t1 SELECT 'a 😠b', 'a 😠b';
SELECT * FROM t1;
DROP TABLE t1;
@@ -1953,7 +1979,7 @@ DROP FUNCTION f1;
--echo # MDEV-9842 LOAD DATA INFILE does not work well with a TEXT column when using sjis
--echo #
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;
SELECT HEX(a) FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/date_formats.test b/mysql-test/t/date_formats.test
index 972543aefc2..06f933e4939 100644
--- a/mysql-test/t/date_formats.test
+++ b/mysql-test/t/date_formats.test
@@ -236,18 +236,28 @@ drop table t1;
--disable_ps_protocol
select str_to_date("2003-....01ABCD-02 10:11:12.0012", "%Y-%.%m%@-%d %H:%i:%S.%f") as a;
-
+--error ER_WRONG_VALUE_FOR_TYPE
+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 = '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;
select * from t1;
drop table t1;
create table t1 select "02 10" as a, "%d %H" as b;
select str_to_date(a,b) from t1;
+--error ER_WRONG_VALUE_FOR_TYPE
+create table t2 select str_to_date(a,b) from t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select str_to_date(a,b) from t1;
+set sql_mode = DEFAULT;
describe t2;
select str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S.%f") as f1,
str_to_date("2003-01-02 10:11:12.0012", "%Y-%m-%d %H:%i:%S") as f2,
diff --git a/mysql-test/t/default.test b/mysql-test/t/default.test
index 9ae088405fa..95634d200df 100644
--- a/mysql-test/t/default.test
+++ b/mysql-test/t/default.test
@@ -105,13 +105,15 @@ drop table t2;
# occurs, but if this happens for the second or subsequent row of a
# multiple-row statement, the preceding rows will have been inserted.
#
+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);
-insert into bug20691 (i) values (2);
+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);
+insert ignore into bug20691 (i) values (2);
desc bug20691;
-insert into bug20691 values (3, DEFAULT, DEFAULT), (3, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (3, DEFAULT, DEFAULT);
-insert into bug20691 (i) values (4);
-insert into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, 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);
+insert ignore into bug20691 (i) values (4);
+insert ignore into bug20691 values (5, DEFAULT, DEFAULT), (5, '1975-07-10 07:10:03', '1978-01-13 14:08:51'), (5, DEFAULT, DEFAULT);
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);
SET sql_mode = 'STRICT_ALL_TABLES';
@@ -809,7 +811,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_TIME(6)));
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
DROP TABLE t1;
--echo #
@@ -817,7 +819,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a DECIMAL(30,6) DEFAULT COALESCE(CURRENT_DATE));
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES();
+INSERT IGNORE INTO t1 VALUES();
DROP TABLE t1;
@@ -852,7 +854,7 @@ CREATE TABLE t1 (
b DECIMAL(30,0) DEFAULT COALESCE(CURRENT_TIMESTAMP(6))
);
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
SELECT * FROM t1;
DROP TABLE t1;
@@ -1403,13 +1405,13 @@ CREATE TABLE t1 (a DECIMAL(10,3),
b VARCHAR(10) DEFAULT CAST(a AS CHAR(10)),
c VARCHAR(10) DEFAULT CAST(a AS CHAR(4)));
SHOW CREATE TABLE t1;
-INSERT INTO t1 (a) VALUES (123.456);
+INSERT IGNORE INTO t1 (a) VALUES (123.456);
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (a INT, b INT UNSIGNED DEFAULT CAST(a AS UNSIGNED));
SHOW CREATE TABLE t1;
-INSERT INTO t1 (a) VALUES (-1);
+INSERT IGNORE INTO t1 (a) VALUES (-1);
SELECT * FROM t1;
DROP TABLE t1;
@@ -1629,7 +1631,7 @@ CREATE TABLE t1 (
x VARCHAR(30) DEFAULT EXPORT_SET(bits, v_on, v_off, v_separator, number_of_bits)
);
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
+INSERT IGNORE INTO t1 VALUES (0x50006,'Y','N','',64,DEFAULT);
SELECT * FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/default_session.test b/mysql-test/t/default_session.test
index 7796354ffd4..f3d3fcaeacb 100644
--- a/mysql-test/t/default_session.test
+++ b/mysql-test/t/default_session.test
@@ -74,7 +74,7 @@ select * from t1;
drop table t1;
create table t1 (a varchar(100) default @@sql_mode);
-insert t1 () values ();
+insert ignore t1 () values ();
set sql_mode=ansi;
insert t1 () values ();
set sql_mode=default;
diff --git a/mysql-test/t/delete.test b/mysql-test/t/delete.test
index c82420640c2..610cb3ae403 100644
--- a/mysql-test/t/delete.test
+++ b/mysql-test/t/delete.test
@@ -212,7 +212,7 @@ drop table t1,t2,t3;
#
create table t1(a date not null);
-insert into t1 values (0);
+insert ignore into t1 values (0);
select * from t1 where a is null;
delete from t1 where a is null;
select count(*) from t1;
diff --git a/mysql-test/t/derived.test b/mysql-test/t/derived.test
index 28781ad6fdb..ad780fe1c2e 100644
--- a/mysql-test/t/derived.test
+++ b/mysql-test/t/derived.test
@@ -216,7 +216,9 @@ drop table t2;
#
# select list counter
#
+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/t/derived_view.test b/mysql-test/t/derived_view.test
index 3a18e9a086e..842bc3414c9 100644
--- a/mysql-test/t/derived_view.test
+++ b/mysql-test/t/derived_view.test
@@ -1064,7 +1064,7 @@ CREATE TABLE t5 (
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');
@@ -1760,6 +1760,7 @@ CREATE TABLE t1 (
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',
@@ -1768,6 +1769,7 @@ CREATE TABLE t2 (
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);
diff --git a/mysql-test/t/distinct.test b/mysql-test/t/distinct.test
index 7cf3d6810bb..24de8337dbb 100644
--- a/mysql-test/t/distinct.test
+++ b/mysql-test/t/distinct.test
@@ -265,8 +265,10 @@ 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);
SELECT DISTINCT t1.*, t2.* FROM t1 LEFT JOIN t2 ON (t2.userid = t1.touserid);
DROP TABLE t1,t2;
diff --git a/mysql-test/t/events_restart.test b/mysql-test/t/events_restart.test
index 7f01859e059..3ad4938d5bf 100644
--- a/mysql-test/t/events_restart.test
+++ b/mysql-test/t/events_restart.test
@@ -38,11 +38,13 @@ create event abc3 on schedule every 1 second do
# type of the 'body' field to blob.
#
# First, let's do a backup to not depend on actual definition of mysql.event
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table event_like like mysql.event;
insert into event_like select * from mysql.event;
# Now let's alter the table and restart the server
alter table mysql.event
change column body body longtext character set utf8 collate utf8_bin;
+set sql_mode = DEFAULT;
--echo "Now we restart the server"
--source include/restart_mysqld.inc
diff --git a/mysql-test/t/failed_auth_3909.test b/mysql-test/t/failed_auth_3909.test
index 3179794d155..f72460691ea 100644
--- a/mysql-test/t/failed_auth_3909.test
+++ b/mysql-test/t/failed_auth_3909.test
@@ -7,7 +7,7 @@ source include/not_embedded.inc;
# the server requests a plugin
#
optimize table mysql.user;
-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');
flush privileges;
--replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT
diff --git a/mysql-test/t/fulltext.test b/mysql-test/t/fulltext.test
index 9dfc49d3dfd..0edc60c1eb9 100644
--- a/mysql-test/t/fulltext.test
+++ b/mysql-test/t/fulltext.test
@@ -293,7 +293,9 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
SELECT t, collation(t),FORMAT(MATCH t AGAINST ('Osnabruck'),6) FROM t1 WHERE MATCH t AGAINST ('Osnabruck');
#alter table t1 modify t text character set latin1 collate latin1_german2_ci not null;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
+set sql_mode = DEFAULT;
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrück');
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
DROP TABLE t1;
diff --git a/mysql-test/t/func_gconcat.test b/mysql-test/t/func_gconcat.test
index 44b9ad53062..abc86476a6b 100644
--- a/mysql-test/t/func_gconcat.test
+++ b/mysql-test/t/func_gconcat.test
@@ -543,7 +543,7 @@ SELECT LENGTH( GROUP_CONCAT( DISTINCT a ) ) FROM t2;
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 );
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 1;
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 2;
SELECT LENGTH( GROUP_CONCAT( a ) ) FROM t3 WHERE b = 3;
@@ -566,7 +566,7 @@ drop table t1;
# Bug #31154: group_concat() and bit fields;
#
create table t1(a bit not null);
-insert into t1 values (), (), ();
+insert ignore into t1 values (), (), ();
select group_concat(distinct a) from t1;
select group_concat(distinct a order by a) from t1;
drop table t1;
diff --git a/mysql-test/t/func_hybrid_type.test b/mysql-test/t/func_hybrid_type.test
index dd8a399025b..d1051f5dcfd 100644
--- a/mysql-test/t/func_hybrid_type.test
+++ b/mysql-test/t/func_hybrid_type.test
@@ -159,7 +159,9 @@ DROP TABLE t1;
--disable_metadata
--enable_ps_protocol
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;
DROP TABLE t2;
DROP TABLE t1;
diff --git a/mysql-test/t/func_in.test b/mysql-test/t/func_in.test
index 9e848aa1847..6cbd5a63706 100644
--- a/mysql-test/t/func_in.test
+++ b/mysql-test/t/func_in.test
@@ -477,9 +477,9 @@ CREATE TABLE t1 (
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;
--enable_warnings
diff --git a/mysql-test/t/func_like.test b/mysql-test/t/func_like.test
index b65bff63298..5026bb76aa3 100644
--- a/mysql-test/t/func_like.test
+++ b/mysql-test/t/func_like.test
@@ -121,7 +121,7 @@ select _cp1251'andre%' like convert('andreÊ%' using cp1251) escape 'Ê';
--echo #
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 ();
INSERT INTO t2 VALUES (1), (2), (3);
SELECT 1 FROM t2 JOIN t1 ON 1 LIKE a GROUP BY a;
DROP TABLE t1, t2;
diff --git a/mysql-test/t/func_math.test b/mysql-test/t/func_math.test
index 08349f007e1..f1db36d605f 100644
--- a/mysql-test/t/func_math.test
+++ b/mysql-test/t/func_math.test
@@ -529,7 +529,7 @@ as foo;
--echo # my_gcvt: Assertion `width > 0 && to != ((void *)0)' failed
--echo #
CREATE TABLE t1(a char(0));
-INSERT INTO t1 (SELECT -pi());
+INSERT IGNORE INTO t1 (SELECT -pi());
DROP TABLE t1;
--echo #
diff --git a/mysql-test/t/func_regexp_pcre.test b/mysql-test/t/func_regexp_pcre.test
index c9b4c10007d..1ce40725108 100644
--- a/mysql-test/t/func_regexp_pcre.test
+++ b/mysql-test/t/func_regexp_pcre.test
@@ -168,7 +168,9 @@ DROP TABLE t1;
EXPLAIN EXTENDED SELECT REGEXP_REPLACE('abc','b','x');
# Check decimals
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REGEXP_REPLACE('abc','b','x')+0;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
@@ -343,7 +345,9 @@ DROP TABLE t1;
EXPLAIN EXTENDED SELECT REGEXP_SUBSTR('abc','b');
# Check decimals
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT REGEXP_SUBSTR('abc','b')+0;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
DROP TABLE t1;
diff --git a/mysql-test/t/func_set.test b/mysql-test/t/func_set.test
index 13f8661db49..47072ba5ffe 100644
--- a/mysql-test/t/func_set.test
+++ b/mysql-test/t/func_set.test
@@ -90,7 +90,7 @@ 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');
INSERT INTO t2 VALUES ('');
SELECT CONVERT( a USING latin1 ) FROM t1;
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index 48872edcd4b..e039e48a888 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -551,8 +551,8 @@ drop table t1, t2;
#
create table t1 (c1 INT, c2 INT UNSIGNED);
-insert into t1 values ('21474836461','21474836461');
-insert into t1 values ('-21474836461','-21474836461');
+insert ignore into t1 values ('21474836461','21474836461');
+insert ignore into t1 values ('-21474836461','-21474836461');
show warnings;
select * from t1;
drop table t1;
diff --git a/mysql-test/t/func_test.test b/mysql-test/t/func_test.test
index d1c0702da80..bcc5e14659a 100644
--- a/mysql-test/t/func_test.test
+++ b/mysql-test/t/func_test.test
@@ -80,7 +80,9 @@ select _koi8r'a' LIKE _latin1'A';
#
# Test for LEAST() BUG in LEFT JOIN
#
+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);
diff --git a/mysql-test/t/func_time.test b/mysql-test/t/func_time.test
index 40a6c387448..3402a5a37b8 100644
--- a/mysql-test/t/func_time.test
+++ b/mysql-test/t/func_time.test
@@ -203,7 +203,7 @@ 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");
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;
@@ -225,7 +225,7 @@ 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");
select dayofyear("0000-00-00"),dayofyear(d),dayofyear(dt),dayofyear(t),dayofyear(c) from t1;
select dayofmonth("0000-00-00"),dayofmonth(d),dayofmonth(dt),dayofmonth(t),dayofmonth(c) from t1;
select month("0000-00-00"),month(d),month(dt),month(t),month(c) from t1;
@@ -244,7 +244,9 @@ 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");
@@ -531,7 +533,7 @@ SELECT EXTRACT(HOUR FROM '10000:02:03');
# check if we get proper warnings if both input string truncation
# and out-of-range value occur
CREATE TABLE t1(f1 TIME);
-INSERT INTO t1 VALUES('916:00:00 a');
+INSERT IGNORE INTO t1 VALUES('916:00:00 a');
SELECT * FROM t1;
DROP TABLE t1;
@@ -934,6 +936,7 @@ DO WEEK((DATE_ADD((CAST(0 AS DATE)), INTERVAL 1 YEAR_MONTH)), 5);
--echo # SIMILAR TO '2009-10-00'
--echo #
+set sql_mode = '';
query_vertical SELECT
DATE('20091000'),
STR_TO_DATE('200910','%Y%m'),
@@ -989,6 +992,7 @@ query_vertical SELECT
TO_DAYs(DATE('0000-01-00')),
TO_DAYs(DATE'0000-01-00'),
TO_DAYs(STR_TO_DATE('000001','%Y%m'));
+set sql_mode = default;
--echo End of 5.1 tests
@@ -1022,7 +1026,7 @@ SET storage_engine=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');
CREATE VIEW v1 AS SELECT * FROM t1;
SELECT CAST(UNIX_TIMESTAMP(a) AS DECIMAL(25,3)) AS c1 FROM v1 ORDER BY 1;
DROP VIEW v1;
@@ -1139,7 +1143,7 @@ drop table t1;
# lp:736791 Crash in make_truncated_value_warning with LEAST()/GREATEST/COALESCE
#
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');
select least(1, f1) from t1;
drop table t1;
@@ -1163,7 +1167,7 @@ drop table t1;
# lp:737111 Different behavior for TIMESTAMPADD with 0000-00-00 argument in 5.1-micro
#
create table t1 (f1 date);
-insert into t1 values ('0000-00-00');
+insert ignore into t1 values ('0000-00-00');
select timestampadd(week, 1, f1) from t1;
select timestampadd(week, 1, date("0000-00-00"));
drop table t1;
@@ -1190,7 +1194,7 @@ select timestamp(greatest('2002-08-20', '0000-00-00 00:00:00'));
# lp:738091 cast(timestamp() AS time returns NULL for 0000-00-00 00:00:00 in 5.1-micro
#
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');
select cast(f1 AS time) from t1;
drop table t1;
@@ -1294,7 +1298,9 @@ CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('2005-05-04');
SELECT CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10'))) AS f2 FROM t1;
SELECT CHAR_LENGTH(CONCAT(FROM_UNIXTIME(CONCAT(a,'10')) MOD FROM_UNIXTIME(CONCAT(a,'10')))) AS f2 FROM t1;
+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;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t2;
SELECT * FROM t2;
DROP TABLE t1,t2;
diff --git a/mysql-test/t/get_diagnostics.test b/mysql-test/t/get_diagnostics.test
index 0b0d8a77087..e96e8016d2f 100644
--- a/mysql-test/t/get_diagnostics.test
+++ b/mysql-test/t/get_diagnostics.test
@@ -667,6 +667,7 @@ DROP PROCEDURE p1;
--echo # Message is truncated to fit into target. No truncation warning.
--echo
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
DELIMITER |;
CREATE PROCEDURE p1()
BEGIN
@@ -682,6 +683,7 @@ CALL p1();
DROP TABLE t1;
DROP PROCEDURE p1;
+SET sql_mode = DEFAULT;
--echo
--echo # Returns number of rows updated by the UPDATE statements.
diff --git a/mysql-test/t/gis-rtree.test b/mysql-test/t/gis-rtree.test
index acd91a91c27..a17d691b6f2 100644
--- a/mysql-test/t/gis-rtree.test
+++ b/mysql-test/t/gis-rtree.test
@@ -169,7 +169,7 @@ CREATE TABLE t1 (st varchar(100));
INSERT INTO t1 VALUES ("Fake string");
CREATE TABLE t2 (geom GEOMETRY NOT NULL, SPATIAL KEY gk(geom));
--error 1416
-INSERT INTO t2 SELECT GeomFromText(st) FROM t1;
+INSERT IGNORE INTO t2 SELECT GeomFromText(st) FROM t1;
drop table t1, t2;
CREATE TABLE t1 (`geometry` geometry NOT NULL default '',SPATIAL KEY `gndx` (`geometry`)) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@@ -842,7 +842,7 @@ CREATE TABLE t1(foo GEOMETRY NOT NULL, SPATIAL INDEX(foo) );
--error 1048
INSERT INTO t1(foo) VALUES (NULL);
--error 1416
-INSERT INTO t1() VALUES ();
+INSERT IGNORE INTO t1() VALUES ();
--error 1416
INSERT INTO t1(foo) VALUES ('');
DROP TABLE t1;
diff --git a/mysql-test/t/gis.test b/mysql-test/t/gis.test
index 09d7a29744f..b0b80f5f1fe 100644
--- a/mysql-test/t/gis.test
+++ b/mysql-test/t/gis.test
@@ -442,7 +442,7 @@ DROP TABLE t1;
# Bug #30955 geomfromtext() crasher
#
CREATE TABLE `t1` ( `col9` set('a'), `col89` date);
-INSERT INTO `t1` VALUES ('','0000-00-00');
+INSERT IGNORE INTO `t1` VALUES ('','0000-00-00');
select geomfromtext(col9,col89) as a from t1;
DROP TABLE t1;
diff --git a/mysql-test/t/group_by.test b/mysql-test/t/group_by.test
index a97d8ef4248..b0949cfef03 100644
--- a/mysql-test/t/group_by.test
+++ b/mysql-test/t/group_by.test
@@ -21,10 +21,10 @@ CREATE TABLE t1 (
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');
+INSERT IGNORE INTO t1 VALUES (2,2,2,'','0000-00-00');
+INSERT IGNORE INTO t1 VALUES (2,1,1,'','0000-00-00');
+INSERT IGNORE INTO t1 VALUES (3,3,3,'','0000-00-00');
CREATE TABLE t2 (
userID int(10) unsigned NOT NULL auto_increment,
@@ -59,6 +59,7 @@ drop table t1,t2;
# Bug in GROUP BY, by Nikki Chumakov <nikki@saddam.cityline.ru>
#
+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,
@@ -78,6 +79,7 @@ CREATE TABLE t1 (
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);
@@ -127,6 +129,7 @@ drop table t1;
# Test of group by bug in bugzilla
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
bug_id mediumint(9) NOT NULL auto_increment,
groupset bigint(20) DEFAULT '0' NOT NULL,
@@ -167,6 +170,7 @@ CREATE TABLE t1 (
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);
diff --git a/mysql-test/t/having.test b/mysql-test/t/having.test
index f826feff5c0..160b347f870 100644
--- a/mysql-test/t/having.test
+++ b/mysql-test/t/having.test
@@ -365,7 +365,7 @@ select * from t1 a, t1 b group by a.s1 having s1 is null;
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');
select s1,count(s1) from t1
group by s1 collate latin1_swedish_ci having s1 = 'y';
diff --git a/mysql-test/t/help.test b/mysql-test/t/help.test
index dc5dc1cee5f..802f24f80a9 100644
--- a/mysql-test/t/help.test
+++ b/mysql-test/t/help.test
@@ -13,22 +13,22 @@
# impossible_category_3
# impossible_function_7
-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');
select @category1_id:= 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');
select @category2_id:= 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);
select @category3_id:= 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');
select @topic1_id:= 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');
select @topic2_id:= 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');
select @topic3_id:= 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');
select @topic4_id:= 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');
select @topic5_id:= 10105;
insert into mysql.help_keyword(help_keyword_id,name)values(10201,'impossible_function_1');
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 2d95dffa17a..e437a3a9b7d 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -36,8 +36,8 @@ select a,t>0,c,i from t1;
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;
+insert ignore into t1 set a=5,t=0,c="a",i=null;
insert into t1 set a=default,t=default,c=default,i=default;
select a,t>0,c,i from t1;
drop table t1;
@@ -98,23 +98,23 @@ 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);
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
--error 1367
@@ -124,11 +124,11 @@ set @value= -1e+1111111111;
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);
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
set @value= 1;
@@ -136,7 +136,7 @@ insert into t1 values(null,@value,@value,@value,@value,@value,@value,@value,@val
--query_vertical select * from t1 where number =last_insert_id()
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);
--query_vertical select * from t1 where number =last_insert_id()
drop table t1;
@@ -404,7 +404,7 @@ CREATE TABLE t1 (
);
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);
INSERT INTO t1(a,b) VALUES (1.225e-04, 1.225e-04);
INSERT INTO t1(a,b) VALUES (1.225e-01, 1.225e-01);
INSERT INTO t1(a,b) VALUES (1.225877e-01, 1.225877e-01);
@@ -421,7 +421,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);
INSERT INTO t1(a,c) VALUES (-1.87e-2, -1.87e-2);
INSERT INTO t1(a,c) VALUES (5000e+0, 5000e+0);
INSERT INTO t1(a,c) VALUES (-5000e+0, -5000e+0);
diff --git a/mysql-test/t/insert_select.test b/mysql-test/t/insert_select.test
index bcd87c2688d..b32e25763cf 100644
--- a/mysql-test/t/insert_select.test
+++ b/mysql-test/t/insert_select.test
@@ -21,6 +21,7 @@ drop table t1,t2;
# test case by Fournier Jocelyn <joc@presence-pc.com>
#
+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',
@@ -36,7 +37,9 @@ CREATE TABLE `t1` (
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',
@@ -52,6 +55,7 @@ CREATE TABLE `t2` (
KEY `pseudo` (`pseudo`),
KEY `numreponse` (`numreponse`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
INSERT INTO t2
(numeropost,icone,numreponse,contenu,pseudo,date,ip,signature) VALUES
@@ -145,7 +149,7 @@ Select null, Field, Count From t1 Where Month=20030901 and Type=2;
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;
select * from t2;
@@ -329,11 +333,13 @@ DROP TABLE t1, t2;
# Bug#44306: Assertion fail on duplicate key error in 'INSERT ... SELECT'
# statements
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 ( a INT KEY, b INT );
INSERT INTO t1 VALUES ( 0, 1 );
--error ER_DUP_ENTRY
INSERT INTO t1 ( b ) SELECT MAX( b ) FROM t1 WHERE b = 2;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
#
# Bug #26207: inserts don't work with shortened index
diff --git a/mysql-test/t/join.test b/mysql-test/t/join.test
index e07a3665920..91583f947ba 100644
--- a/mysql-test/t/join.test
+++ b/mysql-test/t/join.test
@@ -65,6 +65,7 @@ drop table t1,t2;
# problem with join
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
token varchar(100) DEFAULT '' NOT NULL,
@@ -77,6 +78,7 @@ CREATE TABLE t1 (
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');
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index a3a1278ef1e..70b412202c1 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -1691,14 +1691,14 @@ drop table t0, t1;
--echo # (this is a regression after fix for MDEV-4817)
--echo #
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');
CREATE TABLE t2 (i INT);
SELECT * FROM t1 LEFT JOIN t2 ON (id=i) WHERE NULL OR d IS 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');
CREATE TABLE t2 (i2 INT, j2 INT);
INSERT INTO t2 VALUES (1,10),(2,20);
diff --git a/mysql-test/t/join_outer_innodb.test b/mysql-test/t/join_outer_innodb.test
index 539d85a8b11..fe08689c80b 100644
--- a/mysql-test/t/join_outer_innodb.test
+++ b/mysql-test/t/join_outer_innodb.test
@@ -155,7 +155,7 @@ CREATE TABLE t1 (
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/t/key.test b/mysql-test/t/key.test
index e2697effeb6..0695dc2eecb 100644
--- a/mysql-test/t/key.test
+++ b/mysql-test/t/key.test
@@ -46,7 +46,7 @@ CREATE TABLE t1 (
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','','','','');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
INSERT INTO t1 VALUES (900,'Vancouver','Shared/Roomate','Y','Y','Y','Y');
@@ -184,7 +184,7 @@ 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);
SELECT * FROM t1;
INSERT INTO t1 (c) VALUES ('a'),('a');
SELECT * FROM t1;
@@ -201,8 +201,8 @@ drop table t1;
# longer keys
#
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 t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
+insert ignore t1 values (1, repeat('a',210), repeat('b', 310));
+insert ignore t1 values (2, repeat(0xD0B1,215), repeat(0xD0B1, 310));
select i, length(a), length(b), char_length(a), char_length(b) from t1;
select i from t1 where a=repeat(_utf8 'a',200);
select i from t1 where a=repeat(_utf8 0xD0B1,200);
diff --git a/mysql-test/t/limit_rows_examined.test b/mysql-test/t/limit_rows_examined.test
index 4997bacec57..29b3b411602 100644
--- a/mysql-test/t/limit_rows_examined.test
+++ b/mysql-test/t/limit_rows_examined.test
@@ -395,7 +395,7 @@ drop table t3,t3i;
--echo 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;
select * from t4;
INSERT INTO t4 SELECT a + 2 FROM t4 LIMIT ROWS EXAMINED 6;
select * from t4;
diff --git a/mysql-test/t/loaddata.test b/mysql-test/t/loaddata.test
index 7e529194303..f827883af85 100644
--- a/mysql-test/t/loaddata.test
+++ b/mysql-test/t/loaddata.test
@@ -9,12 +9,12 @@ drop table if exists t1, t2;
--enable_warnings
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 ',';
load data infile '../../std_data/loaddata1.dat' into table t1 fields terminated by ',' IGNORE 2 LINES;
SELECT * from t1;
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);
SELECT * from t1;
drop table t1;
@@ -129,7 +129,7 @@ select * from t1;
select @a, @b;
truncate table t1;
# Reading of all columns with set
-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;
select * from t1;
truncate table t1;
# now going to test fixed field-row file format
@@ -198,7 +198,7 @@ create table t2(f1 int);
insert into t2 values(1),(2);
disable_query_log;
eval select * into outfile '$MYSQLTEST_VARDIR/tmp/t2' from t2;
-eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1;
+eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1;
enable_query_log;
select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1;
remove_file $MYSQLTEST_VARDIR/tmp/t2;
@@ -207,7 +207,7 @@ disable_query_log;
eval SELECT * INTO OUTFILE '$MYSQLTEST_VARDIR/tmp/t2'
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n'
FROM t2;
-eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' into table t1
+eval load data infile '$MYSQLTEST_VARDIR/tmp/t2' ignore into table t1
FIELDS TERMINATED BY '' OPTIONALLY ENCLOSED BY '' LINES TERMINATED BY '\r\n';
enable_query_log;
select f1 from t1 where f2 <> '0000-00-00 00:00:00' order by f1;
@@ -675,7 +675,7 @@ SELECT HEX(val) FROM t1;
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;
SELECT COUNT(*) FROM t1;
SELECT HEX(val) FROM t1;
diff --git a/mysql-test/t/mdev-504.test b/mysql-test/t/mdev-504.test
index b96c8779c68..76232927cd9 100644
--- a/mysql-test/t/mdev-504.test
+++ b/mysql-test/t/mdev-504.test
@@ -51,7 +51,7 @@ while ($trial)
let $query = `SELECT CASE rnd3()
WHEN 1 THEN 'INSERT INTO A (pk) VALUES (NULL)'
WHEN 2 THEN 'DELETE FROM A LIMIT 1'
- ELSE 'UPDATE A SET fdate = 2 LIMIT 1' END`;
+ ELSE 'UPDATE IGNORE A SET fdate = 2 LIMIT 1' END`;
--eval $query
--disconnect con3
--dec $run
diff --git a/mysql-test/t/multi_update.test b/mysql-test/t/multi_update.test
index 4e09b2370f5..f99ba7db228 100644
--- a/mysql-test/t/multi_update.test
+++ b/mysql-test/t/multi_update.test
@@ -616,9 +616,9 @@ 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;
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;
DROP VIEW v1;
DROP FUNCTION f1;
DROP TABLE t1;
@@ -892,6 +892,7 @@ Annftt','49','ggobilcogg','grfurt','Intfrn','ggggil',NULL),('2008/4','200812','2
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',
@@ -939,6 +940,7 @@ CREATE TABLE `t3` (
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,
diff --git a/mysql-test/t/myisam-blob.test b/mysql-test/t/myisam-blob.test
index ac1b45b8c6c..6cd0be8d623 100644
--- a/mysql-test/t/myisam-blob.test
+++ b/mysql-test/t/myisam-blob.test
@@ -30,13 +30,15 @@ check table t1;
INSERT INTO t1 set data=repeat('a',18*1024*1024);
select length(data) from t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table t1 modify data blob;
+set sql_mode = default;
select length(data) from t1;
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);
select length(data) from t1;
drop table t1;
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index dac19c1d395..c47494cb13b 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -42,7 +42,7 @@ begin;
SET SQL_WARNINGS=0;
while ($1)
{
- eval insert into t1 (b) values(repeat(char(65+$1),65550-$1));
+ eval insert ignore into t1 (b) values(repeat(char(65+$1),65550-$1));
dec $1;
}
commit;
@@ -313,6 +313,7 @@ drop table t1;
#
# Test of REPAIR that once failed
#
+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',
@@ -330,8 +331,9 @@ CREATE TABLE `t1` (
KEY `topic_id` (`topic_id`),
FULLTEXT KEY `post_text` (`post_text`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
-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');
+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');
REPAIR TABLE t1;
CHECK TABLE t1;
@@ -1027,10 +1029,14 @@ source include/varchar.inc;
create table t1 (v varchar(65530), key(v));
drop table if exists t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65536));
+set sql_mode = DEFAULT;
show create table t1;
drop table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (v varchar(65530) character set utf8);
+set sql_mode = DEFAULT;
show create table t1;
drop table t1;
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index 299698ed04b..090ed45c9f9 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -58,7 +58,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1 (a double);
-INSERT INTO t1 VALUES ('-9e999999');
+INSERT IGNORE INTO t1 VALUES ('-9e999999');
--exec $MYSQL_DUMP --compact test t1
DROP TABLE t1;
diff --git a/mysql-test/t/mysqlslap.opt b/mysql-test/t/mysqlslap.opt
new file mode 100644
index 00000000000..632f5b4c069
--- /dev/null
+++ b/mysql-test/t/mysqlslap.opt
@@ -0,0 +1 @@
+--sql_mode='NO_ENGINE_SUBSTITUTION'
diff --git a/mysql-test/t/null.test b/mysql-test/t/null.test
index 072038fae50..7aa5e909bff 100644
--- a/mysql-test/t/null.test
+++ b/mysql-test/t/null.test
@@ -60,6 +60,7 @@ drop table t1;
#
# Test inserting and updating with NULL
#
+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";
UPDATE t1 SET d=1/NULL;
@@ -86,6 +87,7 @@ INSERT INTO t1 (d) values (1/null);
INSERT INTO t1 (d) values (null),(null);
select * from t1;
drop table t1;
+set sql_mode=default;
#
# Test to check elimination of IS NULL predicate for a non-nullable attribute
@@ -118,7 +120,9 @@ insert into t1 select i*2 from t1;
insert into t1 values(null);
explain select * from t1 where i=2 or i is null;
select count(*) from t1 where i=2 or i is null;
+set sql_mode='NO_ENGINE_SUBSTITUTION';
alter table t1 change i i int not null;
+set sql_mode=default;
explain select * from t1 where i=2 or i is null;
select count(*) from t1 where i=2 or i is null;
drop table t1;
@@ -335,6 +339,7 @@ DROP TABLE t1,t2;
--error ER_CANT_AGGREGATE_2COLLATIONS
SELECT NULLIF(_latin1'a' COLLATE latin1_general_ci, _latin1'a' COLLATE latin1_bin);
+set sql_mode='NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 AS SELECT
NULLIF(1,1),
NULLIF(1,1.0),
@@ -398,6 +403,8 @@ CREATE TABLE t1 AS SELECT
SHOW CREATE TABLE t1;
DROP TABLE t1;
+set sql_mode=default;
+
CREATE TABLE t1
(
c_tinyint TINYINT,
@@ -862,12 +869,14 @@ EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=2010 AND CASE WHEN 10.1=a THEN NULL EL
DROP TABLE t1;
--echo # 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
ELSE TIMESTAMP'2001-01-01 00:00:00'
END AS b;
DROP TABLE t1;
+set sql_mode=default;
--echo #
--echo # MDEV-8785 Wrong results for EXPLAIN EXTENDED...WHERE NULLIF(latin1_col, _utf8'a' COLLATE utf8_bin) IS NOT NULL
diff --git a/mysql-test/t/null_key.test b/mysql-test/t/null_key.test
index 695b2835610..c3ebc6f5b94 100644
--- a/mysql-test/t/null_key.test
+++ b/mysql-test/t/null_key.test
@@ -183,7 +183,7 @@ create table t1 (
index (id),
index (id2)
);
-insert into t1 values(null,null),(1,1);
+insert ignore into t1 values(null,null),(1,1);
select * from t1;
select * from t1 where id <=> null;
select * from t1 where id <=> null or id > 0;
diff --git a/mysql-test/t/old-mode.test b/mysql-test/t/old-mode.test
index 0572570d122..1dc7608fe0e 100644
--- a/mysql-test/t/old-mode.test
+++ b/mysql-test/t/old-mode.test
@@ -34,15 +34,15 @@ SELECT CAST(TIME'-10:30:30' AS DATETIME);
SELECT CAST(TIME'10:20:30' AS DATETIME);
SELECT CAST(TIME'830:20:30' AS DATETIME);
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (TIME'-10:20:30');
-INSERT INTO t1 VALUES (TIME'10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'10:20:30');
INSERT INTO t1 VALUES (TIME'830:20:30');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (a TIMESTAMP);
-INSERT INTO t1 VALUES (TIME'-10:20:30');
-INSERT INTO t1 VALUES (TIME'10:20:30');
-INSERT INTO t1 VALUES (TIME'830:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'-10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'10:20:30');
+INSERT IGNORE INTO t1 VALUES (TIME'830:20:30');
SELECT * FROM t1;
DROP TABLE t1;
CREATE TABLE t1 (a TIME);
diff --git a/mysql-test/t/order_by.test b/mysql-test/t/order_by.test
index 1e32f789806..2c461823cae 100644
--- a/mysql-test/t/order_by.test
+++ b/mysql-test/t/order_by.test
@@ -10,6 +10,8 @@ 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';
+
#
# Test old ORDER BY bug
#
@@ -203,7 +205,6 @@ select t3.DateOfAction, t1.TransactionID from t1 join t2 join t3 where t2.ID = t
drop table t1,t2,t3;
#bug reported by Wouter de Jong
-
CREATE TABLE t1 (
member_id int(11) NOT NULL auto_increment,
inschrijf_datum varchar(20) NOT NULL default '',
diff --git a/mysql-test/t/packet.test b/mysql-test/t/packet.test
index 7e08a0f6c3f..e560c9a5897 100644
--- a/mysql-test/t/packet.test
+++ b/mysql-test/t/packet.test
@@ -17,8 +17,10 @@ set @net_buffer_length=@@global.net_buffer_length;
# setting values below minimum threshold of 1024 will cause truncating
+set sql_mode='NO_ENGINE_SUBSTITUTION';
set global max_allowed_packet=100;
set global net_buffer_length=100;
+set sql_mode=default;
# is not yet in effect
SELECT length("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa") as len;
diff --git a/mysql-test/t/partition_binlog_stmt.test b/mysql-test/t/partition_binlog_stmt.test
index cc57222dc3c..8aa800861d7 100644
--- a/mysql-test/t/partition_binlog_stmt.test
+++ b/mysql-test/t/partition_binlog_stmt.test
@@ -12,12 +12,14 @@ DROP TABLE IF EXISTS t1;
abcd
EOF
+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;
--replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR
eval LOAD DATA LOCAL INFILE '$MYSQLTEST_VARDIR/tmp/init_file.txt'
diff --git a/mysql-test/t/partition_datatype.test b/mysql-test/t/partition_datatype.test
index a6035fcb592..283625ed3de 100644
--- a/mysql-test/t/partition_datatype.test
+++ b/mysql-test/t/partition_datatype.test
@@ -260,12 +260,12 @@ ALTER TABLE t2 PARTITION BY RANGE (UNIX_TIMESTAMP(a))
--echo # 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');
--echo # Test invalid values
-INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI');
-INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI');
-INSERT INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI');
-INSERT INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('2038-01-19 03:14:08', 'UTCI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 00:00:00', 'UTCI');
--echo # Test start range
INSERT INTO t1 VALUES ('1970-01-01 00:00:01', 'UTC');
INSERT INTO t1 VALUES ('1974-02-05 21:28:16', 'UTC');
@@ -290,18 +290,18 @@ SET @@session.time_zone = 'Europe/Moscow';
--echo # 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');
--echo # Test invalid values
-INSERT INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI');
-INSERT INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI');
-INSERT INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI');
-INSERT INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI');
-INSERT INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI');
-INSERT INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('0000-00-00 03:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1901-01-01 00:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1969-12-31 23:59:59', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 02:29:29', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2038-01-19 06:14:08', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('1970-01-01 03:00:00', 'MoscowI');
--echo # values truncated to 03:00:00 due to daylight saving shift
-INSERT INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI');
-INSERT INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI');
-INSERT INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:00', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:00:01', 'MoscowI');
+INSERT IGNORE INTO t1 VALUES ('2011-03-27 02:59:59', 'MoscowI');
--echo # Test start range
INSERT INTO t1 VALUES ('1970-01-01 03:00:01', 'Moscow');
INSERT INTO t1 VALUES ('1974-02-05 21:28:16', 'Moscow');
@@ -386,12 +386,12 @@ WHERE a BETWEEN '2011-10-29 23:00:00' and '2011-10-31 00:00:00' ORDER BY a, tz;
--echo # 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');
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
SELECT * FROM t2 ORDER BY a, tz LIMIT 3;
SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3;
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
SELECT MIN(a), MAX(a) FROM t2;
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
@@ -400,12 +400,12 @@ WHERE TABLE_NAME = 't2';
SELECT * FROM t2 ORDER BY a, tz;
--echo # 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');
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
SELECT * FROM t2 ORDER BY a, tz LIMIT 3;
SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3;
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
SELECT MIN(a), MAX(a) FROM t2;
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
@@ -511,12 +511,12 @@ WHERE a BETWEEN '2011-10-29 01:59:59' and '2011-10-31 00:00:00' ORDER BY a, tz;
--echo # 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');
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
SELECT * FROM t2 ORDER BY a, tz LIMIT 3;
SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3;
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, 1, a);
SELECT MIN(a), MAX(a) FROM t2;
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
@@ -525,12 +525,12 @@ WHERE TABLE_NAME = 't2';
SELECT * FROM t2 ORDER BY a, tz;
--echo # 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');
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
SELECT * FROM t2 ORDER BY a, tz LIMIT 3;
SELECT * FROM t2 ORDER BY a DESC, tz LIMIT 3;
-UPDATE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
+UPDATE IGNORE t2 SET a = TIMESTAMPADD(SECOND, -1, a);
SELECT MIN(a), MAX(a) FROM t2;
SELECT COUNT(*) FROM t2;
SELECT COUNT(*) FROM t2 WHERE a = 0;
diff --git a/mysql-test/t/partition_default.test b/mysql-test/t/partition_default.test
index 1110b311c29..aa2576180e9 100644
--- a/mysql-test/t/partition_default.test
+++ b/mysql-test/t/partition_default.test
@@ -246,11 +246,13 @@ if ($verify_without_partitions)
{
ALTER TABLE t1 REMOVE PARTITIONING;
}
-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');
--source include/partition_date_range.inc
--echo # test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
--source include/partition_date_range.inc
DROP TABLE t1;
--echo # TO_SECONDS, test of LIST and index
@@ -265,11 +267,13 @@ if ($verify_without_partitions)
{
ALTER TABLE t1 REMOVE PARTITIONING;
}
-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');
--source include/partition_date_range.inc
--echo # test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
--source include/partition_date_range.inc
DROP TABLE t1;
diff --git a/mysql-test/t/partition_error.test b/mysql-test/t/partition_error.test
index 858213b1e30..6d53356c309 100644
--- a/mysql-test/t/partition_error.test
+++ b/mysql-test/t/partition_error.test
@@ -87,13 +87,13 @@ PARTITION BY RANGE (DAYOFWEEK(a))
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');
SHOW WARNINGS;
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');
SHOW WARNINGS;
DROP TABLE t1;
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
@@ -1899,11 +1899,13 @@ PARTITION BY RANGE (EXTRACT(DAY FROM a)) (
PARTITION p VALUES LESS THAN (18),
PARTITION pmax VALUES LESS THAN MAXVALUE);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
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);
+SET sql_mode = DEFAULT;
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
ALTER TABLE old
@@ -1985,6 +1987,7 @@ PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
PARTITION p VALUES LESS THAN (1219089600),
PARTITION pmax VALUES LESS THAN MAXVALUE);
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--error ER_WRONG_EXPR_IN_PARTITION_FUNC_ERROR
CREATE TABLE new (a TIMESTAMP, b TIMESTAMP)
PARTITION BY RANGE (UNIX_TIMESTAMP(a + b)) (
@@ -2000,6 +2003,7 @@ PARTITION p VALUES LESS THAN (1219089600),
PARTITION pmax VALUES LESS THAN MAXVALUE);
DROP TABLE old;
+SET sql_mode = DEFAULT;
--echo #
--echo # Bug #56709: Memory leaks at running the 5.1 test suite
@@ -2056,6 +2060,7 @@ SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCH
WHERE TABLE_NAME = 't1' AND TABLE_SCHEMA = 'test';
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(a INT ,
KEY inx_a (a) )
@@ -2067,6 +2072,7 @@ SUBPARTITION BY HASH (a) SUBPARTITIONS 2
PARTITION pMax VALUES LESS THAN MAXVALUE COMMENT
"This is a long comment (2050 ascii characters) 50 pMax partition comment .80-!.................. 100 ................................................................................................ 200....................................................................................................................................................................................................................................................................................................... 500 ............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1000 ..............1024-|.......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................... 1500 .............................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................. 2000 ......................................2048-|++"
(SUBPARTITION `pMaxsp0` ,SUBPARTITION `pMaxsp1` ));
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
SELECT PARTITION_NAME, SUBPARTITION_NAME, PARTITION_COMMENT FROM INFORMATION_SCHEMA.PARTITIONS
diff --git a/mysql-test/t/partition_exchange.test b/mysql-test/t/partition_exchange.test
index e538bee16cd..ab687d5b5f9 100644
--- a/mysql-test/t/partition_exchange.test
+++ b/mysql-test/t/partition_exchange.test
@@ -11,6 +11,7 @@ DROP TABLE IF EXISTS t1, t2, t3, t, tp, tsp, tmp;
--echo #
--echo # 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,
@@ -22,6 +23,7 @@ PARTITIONS 2;
CREATE TABLE t2 LIKE t1;
ALTER TABLE t2 REMOVE PARTITIONING;
+SET sql_mode = DEFAULT;
--vertical_results
SHOW CREATE TABLE t1;
@@ -41,6 +43,7 @@ WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
DROP TABLE t2;
--echo # 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,
@@ -49,6 +52,7 @@ CREATE TABLE t2 (
) ENGINE=InnoDB;
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
@@ -57,6 +61,7 @@ WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
--echo # 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,
@@ -73,6 +78,7 @@ CREATE TABLE t2 (
) ENGINE=InnoDB ROW_FORMAT = COMPACT;
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
SHOW CREATE TABLE t2;
SELECT TABLE_NAME, TABLE_TYPE, ENGINE, ROW_FORMAT, CREATE_OPTIONS
@@ -81,6 +87,7 @@ WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
--echo # 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,
@@ -178,11 +185,13 @@ FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA = 'test' AND TABLE_NAME IN ('t1', 't2');
--horizontal_results
DROP TABLE t1, t2;
+SET sql_mode = DEFAULT;
--echo #
--echo # Bug#56484: !table || (!table->read_set ||
--echo # bitmap_is_set(table->read_set, field_index))
--echo #
+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;
@@ -191,6 +200,7 @@ CREATE TABLE t2 (a INT) ENGINE=MYISAM;
--error ER_TABLES_DIFFERENT_METADATA
ALTER TABLE t1 EXCHANGE PARTITION p1 WITH TABLE t2;
DROP TABLE t1, t2;
+SET sql_mode = DEFAULT;
--echo #
--echo # Bug#55784: Foreign key integrity broken by alter table
diff --git a/mysql-test/t/partition_innodb.test b/mysql-test/t/partition_innodb.test
index a05e086d79b..3665fd61b19 100644
--- a/mysql-test/t/partition_innodb.test
+++ b/mysql-test/t/partition_innodb.test
@@ -651,8 +651,10 @@ DROP TABLE t1;
DROP TABLE IF EXISTS t1;
--enable_warnings
+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/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 9d72e9c0d01..8b9e736cf37 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -208,11 +208,13 @@ if ($verify_without_partitions)
{
ALTER TABLE t1 REMOVE PARTITIONING;
}
-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');
--source include/partition_date_range.inc
--echo # test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
--source include/partition_date_range.inc
DROP TABLE t1;
@@ -228,11 +230,13 @@ if ($verify_without_partitions)
{
ALTER TABLE t1 REMOVE PARTITIONING;
}
-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');
--source include/partition_date_range.inc
--echo # test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
--source include/partition_date_range.inc
DROP TABLE t1;
--echo # TO_SECONDS, test of LIST and index
@@ -247,11 +251,13 @@ if ($verify_without_partitions)
{
ALTER TABLE t1 REMOVE PARTITIONING;
}
-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');
--source include/partition_date_range.inc
--echo # test without index
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 DROP KEY a;
+SET sql_mode = DEFAULT;
--source include/partition_date_range.inc
DROP TABLE t1;
diff --git a/mysql-test/t/plugin_auth.test b/mysql-test/t/plugin_auth.test
index c5d96e0d612..81b8ba6e0a3 100644
--- a/mysql-test/t/plugin_auth.test
+++ b/mysql-test/t/plugin_auth.test
@@ -449,7 +449,7 @@ DROP USER uplain@localhost;
--echo # Bug #59038 : mysql.user.authentication_string column
--echo # causes configuration wizard to fail
-INSERT INTO mysql.user(
+INSERT IGNORE INTO mysql.user(
Host,
User,
Password,
diff --git a/mysql-test/t/ps.test b/mysql-test/t/ps.test
index 00e0c4086bb..48c8f272564 100644
--- a/mysql-test/t/ps.test
+++ b/mysql-test/t/ps.test
@@ -841,13 +841,13 @@ drop table t1;
prepare stmt from 'create table t1 (a varchar(10) character set utf8)';
execute stmt;
--disable_warnings
-insert into t1 (a) values (repeat('a', 20));
+insert ignore into t1 (a) values (repeat('a', 20));
--enable_warnings
select length(a) from t1;
drop table t1;
execute stmt;
--disable_warnings
-insert into t1 (a) values (repeat('a', 20));
+insert ignore into t1 (a) values (repeat('a', 20));
--enable_warnings
# Check that the data is truncated to the same length
select length(a) from t1;
@@ -3101,7 +3101,7 @@ deallocate prepare decode;
--echo # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
--echo #
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);
PREPARE stmt FROM "SELECT 1 FROM t1 WHERE
ROW(a, b) >= ROW('1', (SELECT 1 FROM t1 WHERE a > 1234))";
--disable_warnings
diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test
index a97b0b1c815..3ef81c5c36c 100644
--- a/mysql-test/t/query_cache.test
+++ b/mysql-test/t/query_cache.test
@@ -727,10 +727,12 @@ set GLOBAL query_cache_size=1355776;
# Query with warning prohibited to query cache (BUG#9414)
#
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');
diff --git a/mysql-test/t/quick_select_4161.test b/mysql-test/t/quick_select_4161.test
index 87323087622..e90d0480abd 100644
--- a/mysql-test/t/quick_select_4161.test
+++ b/mysql-test/t/quick_select_4161.test
@@ -3,6 +3,7 @@
#
--source include/have_debug_sync.inc
+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/t/range.test b/mysql-test/t/range.test
index 30f4419bd7e..bf9729c0229 100644
--- a/mysql-test/t/range.test
+++ b/mysql-test/t/range.test
@@ -7,12 +7,14 @@
drop table if exists t1, t2, t3, t10, t100;
--enable_warnings
+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),
@@ -38,6 +40,7 @@ explain select event_date,type,event_id from t1 WHERE type = 100601 and event_da
select event_date,type,event_id from t1 WHERE event_date >= "1999-07-01" AND event_date <= "1999-07-15" AND (type=100600 OR type=100100) or event_date >= "1999-07-01" AND event_date <= "1999-07-15" AND type=100099;
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,
@@ -46,6 +49,7 @@ CREATE TABLE t1 (
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'),
@@ -923,6 +927,7 @@ DROP TABLE t1;
# when a range condition use an invalid datetime constant
#
+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',
@@ -947,6 +952,7 @@ SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-01 24:00:00';
SELECT * FROM t1 WHERE item='A1' AND started<='2005-12-02 00:00:00';
DROP TABLE t1;
+SET sql_mode = DEFAULT;
--echo
--echo BUG#32198 "Comparison of DATE with DATETIME still not using indexes correctly"
diff --git a/mysql-test/t/round.test b/mysql-test/t/round.test
index d018fa7e34e..4ba65c08fcf 100644
--- a/mysql-test/t/round.test
+++ b/mysql-test/t/round.test
@@ -6,13 +6,13 @@ 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');
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 INTO t1 VALUES ('-128.4');
-INSERT INTO t1 VALUES ('-128.5');
+INSERT IGNORE INTO t1 VALUES ('-128.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -22,9 +22,9 @@ 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');
INSERT INTO t1 VALUES ('255.4');
-INSERT INTO t1 VALUES ('255.5');
+INSERT IGNORE INTO t1 VALUES ('255.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -33,13 +33,13 @@ 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');
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 INTO t1 VALUES ('-32768.4');
-INSERT INTO t1 VALUES ('-32768.5');
+INSERT IGNORE INTO t1 VALUES ('-32768.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -50,9 +50,9 @@ 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');
INSERT INTO t1 VALUES ('65535.4');
-INSERT INTO t1 VALUES ('65535.5');
+INSERT IGNORE INTO t1 VALUES ('65535.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -60,13 +60,13 @@ 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');
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 INTO t1 VALUES ('-8388608.4');
-INSERT INTO t1 VALUES ('-8388608.5');
+INSERT IGNORE INTO t1 VALUES ('-8388608.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -76,9 +76,9 @@ 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');
INSERT INTO t1 VALUES ('16777215.4');
-INSERT INTO t1 VALUES ('16777215.5');
+INSERT IGNORE INTO t1 VALUES ('16777215.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -86,13 +86,13 @@ 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');
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 INTO t1 VALUES ('-9223372036854775808.4');
-INSERT INTO t1 VALUES ('-9223372036854775808.5');
+INSERT IGNORE INTO t1 VALUES ('-9223372036854775808.5');
SELECT * FROM t1;
DROP TABLE t1;
@@ -102,9 +102,9 @@ 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');
INSERT INTO t1 VALUES ('18446744073709551615.4');
-INSERT INTO t1 VALUES ('18446744073709551615.5');
+INSERT IGNORE INTO t1 VALUES ('18446744073709551615.5');
INSERT INTO t1 VALUES ('1844674407370955161.0');
INSERT INTO t1 VALUES ('1844674407370955161.1');
INSERT INTO t1 VALUES ('1844674407370955161.2');
diff --git a/mysql-test/t/row.test b/mysql-test/t/row.test
index 1c1d1b00910..6610e527fee 100644
--- a/mysql-test/t/row.test
+++ b/mysql-test/t/row.test
@@ -262,7 +262,7 @@ drop table t1,t2;
--echo # Bug#52124 memory leaks like a sieve in datetime, timestamp, time, date fields + warnings
--echo #
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);
--disable_warnings
SELECT 1 FROM t1 WHERE ROW(a, b) >=
ROW('1', (SELECT 1 FROM t1 WHERE a > 1234));
diff --git a/mysql-test/t/select.test b/mysql-test/t/select.test
index b207db042e6..616de8429da 100644
--- a/mysql-test/t/select.test
+++ b/mysql-test/t/select.test
@@ -2372,7 +2372,7 @@ 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);
select hex(a), hex(b) from t1;
@@ -3808,7 +3808,7 @@ DROP TABLE t1;
--echo #
CREATE TABLE t1(a INT NOT NULL, b YEAR);
-INSERT INTO t1 VALUES ();
+INSERT IGNORE INTO t1 VALUES ();
CREATE TABLE t2(c INT);
--echo # Should not err out because of out-of-memory
SELECT 1 FROM t2 JOIN t1 ON 1=1
@@ -3875,7 +3875,7 @@ SET @@sort_buffer_size= 40000;
CREATE TABLE t1(a CHAR(0) NOT NULL);
--disable_warnings
-INSERT INTO t1 VALUES (0), (0), (0);
+INSERT IGNORE INTO t1 VALUES (0), (0), (0);
--enable_warnings
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
INSERT INTO t1 SELECT t11.a FROM t1 t11, t1 t12;
@@ -3888,7 +3888,7 @@ DROP TABLE t1;
CREATE TABLE t1(a CHAR(0) NOT NULL, b CHAR(0) NOT NULL, c int);
--disable_warnings
-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);
--enable_warnings
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;
@@ -3934,7 +3934,7 @@ CREATE TABLE t2 (
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);
@@ -4004,7 +4004,7 @@ CREATE TABLE `B` (
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,
@@ -4016,7 +4016,7 @@ CREATE TABLE `BB` (
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');
# Test #1
SELECT table1 . `pk` AS field1
FROM
diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test
index 3e60f242083..4c0c5010456 100644
--- a/mysql-test/t/selectivity.test
+++ b/mysql-test/t/selectivity.test
@@ -1037,7 +1037,7 @@ 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');
ANALYZE TABLE t1;
diff --git a/mysql-test/t/show_check.test b/mysql-test/t/show_check.test
index 13ca9a528c6..17d9d7a934f 100644
--- a/mysql-test/t/show_check.test
+++ b/mysql-test/t/show_check.test
@@ -159,6 +159,7 @@ drop table t1;
#
# Do a create table that tries to cover all types and options
#
+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,
@@ -189,6 +190,7 @@ show create table t1;
insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
select * from t1;
drop table t1;
+set sql_mode = default;
#
# Check metadata
diff --git a/mysql-test/t/signal.test b/mysql-test/t/signal.test
index 31bc7bc9633..cdb5796f1da 100644
--- a/mysql-test/t/signal.test
+++ b/mysql-test/t/signal.test
@@ -1346,6 +1346,7 @@ end $$
call test_signal() $$
drop procedure test_signal $$
+SET sql_mode= '' $$
create procedure test_signal()
begin
DECLARE aaax VARCHAR(65);
@@ -1400,6 +1401,7 @@ end $$
call test_signal() $$
drop procedure test_signal $$
+set sql_mode = DEFAULT $$
# Test that HANDLER can catch conditions raised by SIGNAL
@@ -1785,7 +1787,7 @@ begin
select "after RESIGNAL";
end;
- insert into t_warn set a= 9999999999999999;
+ insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
@@ -1904,7 +1906,7 @@ begin
select "after RESIGNAL";
end;
- insert into t_warn set a= 9999999999999999;
+ insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
@@ -2171,7 +2173,7 @@ begin
select "after RESIGNAL";
end;
- insert into t_warn set a= 9999999999999999;
+ insert ignore into t_warn set a= 9999999999999999;
end $$
call test_resignal() $$
@@ -2188,7 +2190,7 @@ begin
select "after RESIGNAL";
end;
- insert into t_warn set a= 9999999999999999;
+ insert ignore into t_warn set a= 9999999999999999;
end $$
--error 5555
@@ -2207,7 +2209,7 @@ begin
select "after RESIGNAL";
end;
- insert into t_warn set a= 9999999999999999;
+ insert ignore into t_warn set a= 9999999999999999;
end $$
--error 5555
diff --git a/mysql-test/t/sp-destruct.test b/mysql-test/t/sp-destruct.test
index 6e19fd885e3..060c7e97077 100644
--- a/mysql-test/t/sp-destruct.test
+++ b/mysql-test/t/sp-destruct.test
@@ -39,7 +39,9 @@ create table t1 (id int);
create trigger t1_ai after insert on t1 for each row call bug14233();
# Unsupported tampering with the mysql.proc definition
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
alter table mysql.proc drop type;
+SET sql_mode = DEFAULT;
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
call bug14233();
--error ER_COL_COUNT_DOESNT_MATCH_CORRUPTED_V2
@@ -93,7 +95,7 @@ flush privileges;
delete from mysql.proc where name like 'bug14233%';
# Unsupported editing of mysql.proc, circumventing checks in "create ..."
-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,
@@ -170,7 +172,9 @@ DROP PROCEDURE IF EXISTS p1;
--echo # 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;
--echo # Test with a valid table.
@@ -183,7 +187,9 @@ SHOW PROCEDURE STATUS;
--echo # Modify a field of the table.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
+SET sql_mode = DEFAULT;
--error ER_CANNOT_LOAD_FROM_TABLE_V2
CREATE PROCEDURE p2()
@@ -238,7 +244,9 @@ let $MYSQLD_DATADIR= `select @@datadir`;
create database mysqltest;
--echo # 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;
--echo # The below statement should not cause assertion failure.
drop database mysqltest;
@@ -263,13 +271,17 @@ DROP DATABASE IF EXISTS db1;
--echo # 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;
--echo # Modify a field of the table.
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE mysql.proc MODIFY comment CHAR (32);
+SET sql_mode = DEFAULT;
# This should not fail even if mysql.proc is invalid.
DROP DATABASE db1;
diff --git a/mysql-test/t/sp-dynamic.test b/mysql-test/t/sp-dynamic.test
index e6f4aae96ac..3a467e26818 100644
--- a/mysql-test/t/sp-dynamic.test
+++ b/mysql-test/t/sp-dynamic.test
@@ -214,6 +214,7 @@ drop procedure p1|
# statements do not substitute SP variables with their values for binlog, so
# SP variables must be not accessible in Dynamic SQL.
#
+set sql_mode= ''|
create procedure p1()
begin
declare a char(10);
@@ -226,6 +227,7 @@ end|
call p1()|
--error ER_BAD_FIELD_ERROR
call p1()|
+set sql_mode= DEFAULT|
drop procedure p1|
#
# J. Use of placeholders in Dynamic SQL.
diff --git a/mysql-test/t/sp-error.test b/mysql-test/t/sp-error.test
index e30fc6e30d4..aa537d3596b 100644
--- a/mysql-test/t/sp-error.test
+++ b/mysql-test/t/sp-error.test
@@ -2734,7 +2734,7 @@ DROP PROCEDURE p1;
--echo #
--echo # Bug#5889: Exit handler for a warning doesn't hide the warning in trigger
--echo #
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 VALUES (1, 2);
@@ -2758,6 +2758,7 @@ SELECT * FROM t1;
DROP TRIGGER t1_bu;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
--echo #
--echo # Bug#9857: Stored procedures: handler for sqlwarning ignored
@@ -2811,13 +2812,13 @@ 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);
# What happened before the patch was:
# - INSERT INTO t1 added 3 warnings about overflow in 'x', 'y' and 'z' columns;
@@ -2845,7 +2846,7 @@ DROP TABLE t2;
DROP PROCEDURE p1;
--echo # ----------------------------------------------------------------------
-
+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);
@@ -2875,6 +2876,7 @@ SHOW WARNINGS;
DROP TABLE t1;
DROP TABLE t2;
DROP PROCEDURE p1;
+SET sql_mode = DEFAULT;
--echo
--echo ###################################################################
@@ -3558,7 +3560,7 @@ BEGIN
# 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.
@@ -3585,7 +3587,7 @@ BEGIN
# 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),
@@ -3665,7 +3667,7 @@ BEGIN
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),
@@ -3688,7 +3690,7 @@ BEGIN
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),
@@ -3723,6 +3725,7 @@ DROP PROCEDURE IF EXISTS p2;
delimiter |;
+SET sql_mode = '';
CREATE PROCEDURE p1()
BEGIN
DECLARE var1 INTEGER DEFAULT 'string';
@@ -3732,6 +3735,7 @@ END|
--echo
CALL p1()|
--echo
+SET sql_mode = DEFAULT;
CREATE PROCEDURE p2()
BEGIN
diff --git a/mysql-test/t/sp_notembedded.test b/mysql-test/t/sp_notembedded.test
index c620f415e22..ccdc670c2bc 100644
--- a/mysql-test/t/sp_notembedded.test
+++ b/mysql-test/t/sp_notembedded.test
@@ -98,6 +98,7 @@ begin
end if;
return 1;
end|
+set sql_mode = ''|
create procedure bug10100p(prm int, inout res int)
begin
set res = res * prm;
@@ -112,6 +113,7 @@ begin
call bug10100p(prm, res);
select res;
end|
+set sql_mode = default|
# a procedure which use tables and recursion
create table t3 (a int)|
@@ -303,7 +305,7 @@ set session low_priority_updates=default;
#
# Bug#44798 MySQL engine crashes when creating stored procedures with execute_priv=N
#
-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/t/strict.test b/mysql-test/t/strict.test
index 93b31499bef..9d69dc83dd6 100644
--- a/mysql-test/t/strict.test
+++ b/mysql-test/t/strict.test
@@ -1234,7 +1234,7 @@ i int comment
123456789*123456789*123456789*123456789*
123456789*123456789*123456789*123456789*
123456789*123456789*123456789*123456789*');
-set @@sql_mode= @org_mode;
+set @@sql_mode= 'NO_ENGINE_SUBSTITUTION';
create table t1
(i int comment
'123456789*123456789*123456789*123456789*
@@ -1268,6 +1268,7 @@ create table t1
select column_name, column_comment from information_schema.columns where
table_schema = 'test' and table_name = 't1';
drop table t1;
+set @@sql_mode= @org_mode;
set names utf8;
create table t1 (i int)
diff --git a/mysql-test/t/subselect.test b/mysql-test/t/subselect.test
index 88bba3b5ce6..2e39d224649 100644
--- a/mysql-test/t/subselect.test
+++ b/mysql-test/t/subselect.test
@@ -171,7 +171,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);
SELECT * FROM t2 WHERE b = (SELECT MIN(b) FROM t2);
@@ -201,6 +203,7 @@ SELECT pseudo FROM t8 WHERE pseudo=(SELECT pseudo FROM t8 WHERE pseudo LIKE '%jo
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8;
#searchconthardwarefr3 forumconthardwarefr7
+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',
@@ -208,6 +211,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';
@@ -230,6 +234,7 @@ CREATE TABLE `t1` (
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',
@@ -237,6 +242,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);
@@ -652,6 +658,7 @@ EXPLAIN EXTENDED SELECT (SELECT BENCHMARK(1,1) FROM t1) FROM 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',
@@ -661,7 +668,9 @@ CREATE TABLE `t1` (
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',
@@ -671,6 +680,7 @@ CREATE TABLE `t2` (
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,
@@ -678,9 +688,9 @@ CREATE TABLE `t3` (
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');
-INSERT INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
+INSERT IGNORE INTO t2 VALUES ('joce','1','','joce'),('test','2','','test');
INSERT INTO t3 VALUES (1,1);
@@ -1031,7 +1041,9 @@ drop table t2, t3;
# correct used_tables()
#
+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);
@@ -2555,12 +2567,14 @@ DROP TABLE t1,t2;
# Bug#20869 subselect with range access by DESC
#
+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'),
@@ -3341,7 +3355,7 @@ 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);
--disable_warnings
-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;
--enable_warnings
diff --git a/mysql-test/t/subselect2.test b/mysql-test/t/subselect2.test
index b3c1322184d..dd30a577b15 100644
--- a/mysql-test/t/subselect2.test
+++ b/mysql-test/t/subselect2.test
@@ -28,8 +28,8 @@ DOCID VARCHAR(32)BINARY NOT NULL
) ENGINE=InnoDB
;
-INSERT INTO t1 (DOCID) VALUES ("1"), ("2");
-
+INSERT IGNORE INTO t1 (DOCID) VALUES ("1"), ("2");
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2
(
DOCID VARCHAR(32)BINARY NOT NULL
@@ -77,6 +77,7 @@ FOLDERID VARCHAR(32)BINARY NOT NULL
CREATE INDEX FFOLDERID_IDX ON t3 (FOLDERID);
CREATE INDEX CMFLDRPARNT_IDX ON t3 (PARENTID);
+SET sql_mode = DEFAULT;
CREATE TABLE t4
(
@@ -140,12 +141,14 @@ INSERT INTO t4 VALUES("c373e9f59cf15a695d47444553544200", "Movie", NULL, 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';
diff --git a/mysql-test/t/subselect4.test b/mysql-test/t/subselect4.test
index 4eb9701ee71..d42b52869a0 100644
--- a/mysql-test/t/subselect4.test
+++ b/mysql-test/t/subselect4.test
@@ -1838,12 +1838,14 @@ CREATE TABLE t1 (
);
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
diff --git a/mysql-test/t/subselect_cache.test b/mysql-test/t/subselect_cache.test
index 21247541fb6..4246cf2352f 100644
--- a/mysql-test/t/subselect_cache.test
+++ b/mysql-test/t/subselect_cache.test
@@ -380,7 +380,9 @@ SELECT a FROM t1 WHERE NOT a IN (SELECT a FROM t1 WHERE b = '02:02:02');
DROP TABLE t1;
--echo #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');
DROP TABLE t1;
diff --git a/mysql-test/t/subselect_innodb.test b/mysql-test/t/subselect_innodb.test
index af6ec90ba74..307493bc0e4 100644
--- a/mysql-test/t/subselect_innodb.test
+++ b/mysql-test/t/subselect_innodb.test
@@ -11,6 +11,7 @@ drop table if exists t1,t2,t3;
#
# key field overflow test
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1
(
FOLDERID VARCHAR(32)BINARY NOT NULL
@@ -30,6 +31,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/t/subselect_sj.test b/mysql-test/t/subselect_sj.test
index b6d6e0a5172..e45d8239ee2 100644
--- a/mysql-test/t/subselect_sj.test
+++ b/mysql-test/t/subselect_sj.test
@@ -192,7 +192,7 @@ CREATE TABLE t2 (
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');
SELECT OUTR.datetime_nokey AS X FROM t1 AS OUTR
@@ -1075,7 +1075,7 @@ 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'),
+INSERT IGNORE INTO t3 VALUES (1,9,'0000-00-00','b','b'),
(2,2,'2002-09-17','h','h');
SELECT t1.varchar_nokey FROM t1 JOIN t3 ON t1.datetime_nokey
@@ -1104,7 +1104,7 @@ CREATE TABLE t1 (
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'),
diff --git a/mysql-test/t/subselect_sj_mat.test b/mysql-test/t/subselect_sj_mat.test
index 559b380a7dc..e20291cfa67 100644
--- a/mysql-test/t/subselect_sj_mat.test
+++ b/mysql-test/t/subselect_sj_mat.test
@@ -1329,7 +1329,7 @@ DROP TABLE t1,t2,t3,t4,t5;
--echo #
CREATE TABLE t2 (a int);
-INSERT INTO t2 VALUES ('a'),('a');
+INSERT IGNORE INTO t2 VALUES ('a'),('a');
CREATE TABLE t4 (a varchar(1));
INSERT INTO t4 VALUES ('m'),('o');
diff --git a/mysql-test/t/system_mysql_db_refs.test b/mysql-test/t/system_mysql_db_refs.test
index c5146e1b043..63f30e7db63 100644
--- a/mysql-test/t/system_mysql_db_refs.test
+++ b/mysql-test/t/system_mysql_db_refs.test
@@ -11,37 +11,37 @@ set @name="This is a very long string, that mustn't find room in a system field
create table test_db select * from mysql.db;
delete from test_db;
--disable_warnings
-insert into test_db (Host,Db,User) values (@name,@name,@name);
+insert ignore into test_db (Host,Db,User) values (@name,@name,@name);
--enable_warnings
create table test_host select * from mysql.host;
delete from test_host;
--disable_warnings
-insert into test_host (Host,Db) values (@name,@name);
+insert ignore into test_host (Host,Db) values (@name,@name);
--enable_warnings
create table test_user select * from mysql.user;
delete from test_user;
--disable_warnings
-insert into test_user (Host,User) values (@name,@name);
+insert ignore into test_user (Host,User) values (@name,@name);
--enable_warnings
create table test_func select * from mysql.func;
delete from test_func;
--disable_warnings
-insert into test_func (name) values (@name);
+insert ignore into test_func (name) values (@name);
--enable_warnings
create table test_tables_priv select * from mysql.tables_priv;
delete from test_tables_priv;
--disable_warnings
-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);
--enable_warnings
create table test_columns_priv select * from mysql.columns_priv;
delete from test_columns_priv;
--disable_warnings
-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);
--enable_warnings
# 'Host' field must be the same for all the tables:
diff --git a/mysql-test/t/temporal_literal.test b/mysql-test/t/temporal_literal.test
index 6783b19a7d4..6d1219a9e16 100644
--- a/mysql-test/t/temporal_literal.test
+++ b/mysql-test/t/temporal_literal.test
@@ -18,9 +18,11 @@ SELECT DATE'01-01';
SELECT DATE'2001';
--error ER_WRONG_VALUE
SELECT DATE'2001-01';
+SET sql_mode = '';
SELECT DATE'2001-00-00';
SELECT DATE'2001-01-00';
SELECT DATE'0000-00-00';
+SET sql_mode = DEFAULT;
--error ER_WRONG_VALUE
SELECT DATE'2001-01-01 00:00:00';
SELECT DATE'01:01:01';
@@ -149,6 +151,7 @@ DROP TABLE t1;
EXPLAIN EXTENDED SELECT {ts'2010-01-01 10:10:10'};
EXPLAIN EXTENDED SELECT TIMESTAMP'2010-01-01 10:10:10';
+SET sql_mode = '';
--echo #
--echo # Testing nanosecond rounding for TIMESTAMP literals with bad dates
--echo #
@@ -182,6 +185,7 @@ INSERT INTO t1 VALUES ('2001-00-01 00:00:00.9999999');
INSERT INTO t1 VALUES ('2001-01-00 00:00:00.9999999');
SELECT * FROM t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
--echo #
--echo # Testing Item_date_literal::eq
@@ -263,7 +267,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;
SET sql_mode='no_zero_in_date';
@@ -274,29 +278,30 @@ DROP TABLE t1;
--echo #
--echo # MDEV-5971 Asymmetry between CAST(DATE'2001-00-00') to INT and TO CHAR in prepared statements
--echo #
-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;
-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;
-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;
-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;
+SET sql_mode=DEFAULT;
--echo #
--echo # Zero month or zero day automatically mean NULL flag, no matter SQL_MODE is.
--echo # Only zero year is OK for NOT NULL.
--echo #
-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;
@@ -307,8 +312,8 @@ EXECUTE stmt;
SHOW COLUMNS FROM t1;
SELECT * FROM t1;
DROP TABLE t1;
-SET sql_mode=DEFAULT;
+SET sql_mode='';
CREATE TABLE t1 AS SELECT
DATE'2001-01-01',
DATE'0000-01-01',
@@ -326,18 +331,19 @@ CREATE TABLE t1 AS SELECT
TIMESTAMP'2001-01-00 00:00:00';
SHOW CREATE TABLE t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
--echo #
--echo # MDEV-5975 Prepared statements with DATE literals do not honor NO_ZERO_IN_DATE
--echo #
-SET sql_mode=DEFAULT;
+SET sql_mode='';
PREPARE stmt FROM "SELECT (SELECT DATE'2001-00-00') AS c";
EXECUTE stmt;
SET sql_mode='no_zero_in_date';
EXECUTE stmt;
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;
SET sql_mode='no_zero_in_date';
diff --git a/mysql-test/t/timezone2.test b/mysql-test/t/timezone2.test
index 7a38610ad95..da97ac472f1 100644
--- a/mysql-test/t/timezone2.test
+++ b/mysql-test/t/timezone2.test
@@ -111,21 +111,21 @@ 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');
select * from t1;
truncate table t1;
# MET time zone has range shifted by one hour
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');
select * from t1;
truncate table t1;
# same for +01:30 time zone
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');
select * from t1;
diff --git a/mysql-test/t/trigger.test b/mysql-test/t/trigger.test
index 050bd5ea56e..4620c82bc91 100644
--- a/mysql-test/t/trigger.test
+++ b/mysql-test/t/trigger.test
@@ -1579,7 +1579,7 @@ drop table t1;
# Bug#25398: crash when a trigger contains a SELECT with
# trigger fields in the select list under DISTINCT
#
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id int NOT NULL DEFAULT '0',
a varchar(10) NOT NULL,
@@ -1620,6 +1620,7 @@ UPDATE t1 SET c='Bang!' WHERE id=1;
SELECT fubar_id FROM t2;
DROP TABLE t1,t2;
+SET sql_mode = DEFAULT;
#
# Bug#21285 (Incorrect message error deleting records in a table with a
@@ -2367,7 +2368,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;
CREATE TRIGGER t1_bu BEFORE UPDATE ON t1 FOR EACH ROW
INSERT INTO t2 VALUES (3);
UPDATE t1 SET id=NULL;
@@ -2463,6 +2464,7 @@ DROP TEMPORARY TABLE t2;
# Bug#36649: Condition area is not properly cleaned up after stored routine invocation
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
--disable_warnings
DROP TRIGGER IF EXISTS trg1;
DROP TABLE IF EXISTS t1;
@@ -2512,6 +2514,7 @@ BEGIN
END|
delimiter ;|
+SET sql_mode = DEFAULT;
INSERT INTO t1 VALUES (0);
SELECT * FROM t1;
diff --git a/mysql-test/t/type_binary.test b/mysql-test/t/type_binary.test
index b583e257aa9..952bc6ef231 100644
--- a/mysql-test/t/type_binary.test
+++ b/mysql-test/t/type_binary.test
@@ -74,7 +74,7 @@ select hex(cast(0x10 as binary(2)));
#
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);
drop table t1;
create table t1 (c char(2), vc varchar(2));
insert into t1 values(0x4120, 0x4120);
@@ -95,7 +95,7 @@ set @@sql_mode= @old_sql_mode;
# Bug#14171: Wrong default value for a BINARY field
#
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;
select hex(f2), hex(f3) from t1;
drop table t1;
diff --git a/mysql-test/t/type_bit.test b/mysql-test/t/type_bit.test
index 2ca608e76ff..761f200fe0c 100644
--- a/mysql-test/t/type_bit.test
+++ b/mysql-test/t/type_bit.test
@@ -168,7 +168,7 @@ drop table t1;
#
create table t1 (a bit(8)) engine=heap;
-insert into t1 values ('1111100000');
+insert ignore into t1 values ('1111100000');
select a+0 from t1;
drop table t1;
@@ -257,7 +257,7 @@ 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');
select hex(a), b from t1;
drop table t1;
@@ -324,7 +324,7 @@ DROP TABLE t2;
CREATE TABLE t1(a BIT(13), KEY(a));
--disable_warnings
-INSERT INTO t1(a) VALUES
+INSERT IGNORE INTO t1(a) VALUES
(65535),(65525),(65535),(65535),(65535),(65535),(65535),(65535),(65535),(65535);
--enable_warnings
diff --git a/mysql-test/t/type_bit_innodb.test b/mysql-test/t/type_bit_innodb.test
index 27eaeda0f99..4c6f9bc1b49 100644
--- a/mysql-test/t/type_bit_innodb.test
+++ b/mysql-test/t/type_bit_innodb.test
@@ -38,7 +38,7 @@ select hex(a) from t1;
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');
select hex(a) from t1;
# It is not deterministic which duplicate will be seen first
--replace_regex /entry '(.*)' for/entry '' for/
@@ -47,7 +47,7 @@ alter table t1 add unique (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');
select a+0 from t1;
alter table t1 add key (a);
explain select a+0 from t1;
diff --git a/mysql-test/t/type_blob.test b/mysql-test/t/type_blob.test
index b818e1b451d..a1231cc23b7 100644
--- a/mysql-test/t/type_blob.test
+++ b/mysql-test/t/type_blob.test
@@ -17,8 +17,12 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7;
CREATE TABLE t1 (a blob, b text, c blob(250), d text(70000), e text(70000000));
show columns from t1;
# PS doesn't give errors on prepare yet
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t2 (a char(255), b varbinary(70000), c varchar(70000000));
+SET sql_mode = DEFAULT;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t4 (c varchar(65530) character set utf8 not null);
+SET sql_mode = DEFAULT;
show columns from t2;
create table t3 (a long, b long byte);
show create TABLE t3;
@@ -33,7 +37,9 @@ drop table t1,t2,t3,t4;
CREATE TABLE t1 (a char(257) default "hello");
--error 1074
CREATE TABLE t2 (a char(256));
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (a varchar(70000) default "hello");
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE t1;
CREATE TABLE t2 (a blob default "hello");
SHOW CREATE TABLE t2;
@@ -169,6 +175,7 @@ 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),
@@ -188,10 +195,11 @@ CREATE TABLE t3 (
KEY _field_145 (_field_145),
KEY _field_148 (_field_148)
);
+SET sql_mode = DEFAULT;
-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);
+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);
+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);
CREATE TABLE t4 (
diff --git a/mysql-test/t/type_date.test b/mysql-test/t/type_date.test
index 63c89f318fc..42a57d70321 100644
--- a/mysql-test/t/type_date.test
+++ b/mysql-test/t/type_date.test
@@ -121,7 +121,7 @@ DROP TABLE t1, t2, t3;
# Test that setting YEAR to invalid string results in default value, not
# 2000. (Bug #6067)
CREATE TABLE t1 (y YEAR);
-INSERT INTO t1 VALUES ('abc');
+INSERT IGNORE INTO t1 VALUES ('abc');
SELECT * FROM t1;
DROP TABLE t1;
@@ -145,7 +145,7 @@ select year(@d), month(@d), day(@d), cast(@d as date);
select @d:=1311;
select year(@d), month(@d), day(@d), cast(@d as date);
create table t1 (d date , dt datetime , ts timestamp);
-insert into t1 values (9912101,9912101,9912101);
+insert ignore into t1 values (9912101,9912101,9912101);
insert into t1 values (11111,11111,11111);
select * from t1;
drop table t1;
@@ -193,8 +193,8 @@ 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');
+INSERT IGNORE INTO t2 VALUES ('0000-00-00'),('0000-00-00');
SELECT * FROM t1 WHERE a = '0000-00-00';
SELECT * FROM t2 WHERE a = '0000-00-00';
SET SQL_MODE=TRADITIONAL;
@@ -213,8 +213,8 @@ 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');
+INSERT IGNORE INTO t2 VALUES ('1000-00-00'),('1000-00-00');
SELECT * FROM t1 WHERE a = '1000-00-00';
SELECT * FROM t2 WHERE a = '1000-00-00';
SET SQL_MODE=TRADITIONAL;
@@ -282,7 +282,7 @@ DROP TABLE t1;
# lp:737496 Field_temporal::store_TIME_with_warning() in 5.1-micro
#
create table t1 (f1 date, key (f1));
-insert t1 values ('2010-10-10 15:foobar');
+insert ignore t1 values ('2010-10-10 15:foobar');
drop table t1;
--echo #
diff --git a/mysql-test/t/type_datetime.test b/mysql-test/t/type_datetime.test
index b16d426ab70..1ec9ecf59c7 100644
--- a/mysql-test/t/type_datetime.test
+++ b/mysql-test/t/type_datetime.test
@@ -24,7 +24,7 @@ select * from t1;
# Test some wrong dates
truncate table t1;
-insert into t1 values("2003-0303 12:13:14");
+insert ignore into t1 values("2003-0303 12:13:14");
select * from t1;
drop table t1;
@@ -42,7 +42,7 @@ drop table t1;
#
CREATE TABLE t1 (a datetime not null);
-insert into t1 values (0);
+insert ignore into t1 values (0);
select * from t1 where a is null;
drop table t1;
@@ -62,6 +62,7 @@ drop table t1;
# Test of datetime optimization
#
+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',
@@ -70,10 +71,11 @@ CREATE TABLE `t1` (
KEY `date` (`date`),
KEY `expedition` (`expedition`)
) ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
-INSERT INTO t1 (expedition) VALUES ('0001-00-00 00:00:00');
+INSERT IGNORE INTO t1 (expedition) VALUES ('0001-00-00 00:00:00');
SELECT * FROM t1 WHERE expedition='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');
SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
EXPLAIN SELECT * FROM t1 WHERE expedition='0001-00-00 00:00:00';
drop table t1;
@@ -88,16 +90,16 @@ drop table t1;
# warnings (for both strings and numbers)
#
create table t1 (t datetime);
-insert into t1 values (20030102030460),(20030102036301),(20030102240401),
+insert ignore into t1 values (20030102030460),(20030102036301),(20030102240401),
(20030132030401),(20031302030401),(100001202030401);
select * from t1;
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");
select * from t1;
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");
select * from t1 order by t;
drop table t1;
@@ -107,9 +109,9 @@ drop table t1;
#
create table t1 (dt datetime);
# These dates should be treated as dates in 21st century
-insert into t1 values ("12-00-00"), ("00-00-00 01:00:00");
+insert ignore into t1 values ("12-00-00"), ("00-00-00 01:00:00");
# Zero dates are still special :/
-insert into t1 values ("00-00-00"), ("00-00-00 00:00:00");
+insert ignore into t1 values ("00-00-00"), ("00-00-00 00:00:00");
select * from t1;
drop table t1;
@@ -455,7 +457,7 @@ SELECT CAST(CAST('2008-07-29T10:42:51.1234567' AS DateTime(6)) AS DECIMAL(30,7))
--echo # Day is ZERO
--echo #
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');
DELETE FROM t1 WHERE dt1 = '0000-00-01 00:00:01';
--echo # Should be empty
SELECT * FROM t1;
@@ -479,7 +481,7 @@ SET timestamp=DEFAULT;
--echo #
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');
create table t2 (c int);
insert t2 values (1),(3);
@@ -586,10 +588,10 @@ DROP TABLE t1;
--echo #
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);
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);
--echo
SELECT * FROM t1 WHERE a IS NULL;
@@ -712,38 +714,42 @@ DROP TABLE t1;
--echo # MDEV-9337 ALTER from DECIMAL and INT to DATETIME returns a wrong result
--echo #
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (1000);
+INSERT IGNORE INTO t1 VALUES (1000);
SELECT * FROM t1;
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;
SELECT * FROM t1;
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;
DROP TABLE t1;
CREATE TABLE t1 (a DATETIME);
-INSERT INTO t1 VALUES (1000.0);
+INSERT IGNORE INTO t1 VALUES (1000.0);
SELECT * FROM t1;
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;
SELECT * FROM t1;
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;
DROP TABLE t1;
diff --git a/mysql-test/t/type_datetime_hires.test b/mysql-test/t/type_datetime_hires.test
index a62c227f563..5a0a3d916c0 100644
--- a/mysql-test/t/type_datetime_hires.test
+++ b/mysql-test/t/type_datetime_hires.test
@@ -7,6 +7,7 @@ let type=datetime;
#
# partitioning
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t1 (
taken $type(5) NOT NULL DEFAULT '0000-00-00 00:00:00',
id int(11) NOT NULL DEFAULT '0',
@@ -18,6 +19,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),
@@ -33,6 +35,7 @@ INSERT INTO t1 VALUES
SELECT id,to_days(taken) FROM t1 order by 2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
eval CREATE TABLE t2 (
taken $type(5) NOT NULL DEFAULT '0000-00-00 00:00:00',
id int(11) NOT NULL DEFAULT '0',
@@ -44,6 +47,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),
diff --git a/mysql-test/t/type_decimal.test b/mysql-test/t/type_decimal.test
index 834fd0c5327..13c6a1a29b6 100644
--- a/mysql-test/t/type_decimal.test
+++ b/mysql-test/t/type_decimal.test
@@ -162,34 +162,34 @@ 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 into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
-insert into t1 values ("1e+4294967296"),("1e-4294967296");
-insert into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("1e+4294967296"),("1e-4294967296");
+insert ignore into t1 values ("1e+18446744073709551615"),("1e+18446744073709551616"),("1e-9223372036854775807"),("1e-9223372036854775809");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
select * from t1;
drop table t1;
create table t1 (a decimal(10,2) unsigned);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
-insert into t1 values ("-.1"),("+.1"),(".1");
+insert ignore into t1 values ("-.1"),("+.1"),(".1");
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
-insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
-insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
select * from t1;
drop table t1;
create table t1 (a decimal(10,2) zerofill);
insert into t1 values ("0.0"),("-0.0"),("+0.0"),("01.0"),("+01.0"),("-01.0");
-insert into t1 values ("-.1"),("+.1"),(".1");
+insert ignore into t1 values ("-.1"),("+.1"),(".1");
insert into t1 values ("00000000000001"),("+0000000000001"),("-0000000000001");
-insert into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
-insert into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
-insert into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
-insert into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
+insert ignore into t1 values ("+111111111.11"),("111111111.11"),("-11111111.11");
+insert ignore into t1 values ("-111111111.11"),("+1111111111.11"),("1111111111.11");
+insert ignore into t1 values ("1e+1000"),("1e-1000"),("-1e+1000");
+insert ignore into t1 values ("123.4e"),("123.4e+2"),("123.4e-2"),("123e1"),("123e+0");
select * from t1;
drop table t1;
@@ -199,9 +199,9 @@ 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 into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
-insert into t1 values (1e+100),(1e-100),(-1e+100);
+insert ignore into t1 values (+111111111.11),(111111111.11),(-11111111.11);
+insert ignore into t1 values (-111111111.11),(+1111111111.11),(1111111111.11);
+insert ignore into t1 values (1e+100),(1e-100),(-1e+100);
insert into t1 values (123.4e0),(123.4e+2),(123.4e-2),(123e1),(123e+0);
insert into t1 values (MID("987",1,2)),("987 "),("987.6e+2 ");
select * from t1;
@@ -212,28 +212,28 @@ 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);
select * from t1;
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);
select * from t1;
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);
select * from t1;
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);
select * from t1;
drop table t1;
# Exponent overflow bug
create table t1(a decimal(10,0));
-insert into t1 values ("1e4294967295");
+insert ignore into t1 values ("1e4294967295");
select * from t1;
delete from t1;
-insert into t1 values("1e4294967297");
+insert ignore into t1 values("1e4294967297");
select * from t1;
drop table t1;
@@ -389,9 +389,11 @@ drop table t1;
#
# Bug#22183: Unhandled NULL caused server crash
#
+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;
drop table t1;
diff --git a/mysql-test/t/type_enum.test b/mysql-test/t/type_enum.test
index 63e9e9e7b09..4bf3d7e7496 100644
--- a/mysql-test/t/type_enum.test
+++ b/mysql-test/t/type_enum.test
@@ -30,9 +30,9 @@ drop table t1;
#
create table t1 (a enum ('0','1'));
-insert into t1 set a='foobar';
+insert ignore into t1 set a='foobar';
select * from t1;
-update t1 set a = replace(a,'x','y');
+update ignore t1 set a = replace(a,'x','y');
select * from t1;
drop table t1;
@@ -160,7 +160,7 @@ create table t1(exhausting_charset enum('ABCDEFGHIJKLMNOPQRSTUVWXYZ','
# Bug #29251: MySQL coerces special 0 enum values to normal '' value
# when ALTERing the column
#
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
id INT AUTO_INCREMENT PRIMARY KEY,
c1 ENUM('a', '', 'b')
@@ -172,6 +172,7 @@ ALTER TABLE t1 CHANGE c1 c1 ENUM('a', '') NOT NULL;
SELECT id, c1 + 0, c1 FROM t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
--echo End of 4.1 tests
@@ -191,7 +192,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);
INSERT INTO t1 (c1) VALUES ('');
SELECT c1 + 0, COUNT(c1) FROM t1 GROUP BY c1;
@@ -394,6 +395,7 @@ DROP TABLE t1;
--echo # MDEV-9340 Copying from INT/DOUBLE to ENUM is inconsistent
--echo #
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
# DOUBLE -> ENUM
CREATE TABLE t1 (a ENUM('9e200','9e100'));
CREATE TABLE t2 (a DOUBLE);
@@ -450,3 +452,5 @@ INSERT INTO t1 VALUES ('2001');
ALTER TABLE t1 MODIFY a ENUM('2001','2002');
SELECT * FROM t1;
DROP TABLE t1;
+SET sql_mode = DEFAULT;
+
diff --git a/mysql-test/t/type_float.test b/mysql-test/t/type_float.test
index f54eacf0595..540ab7e4a4e 100644
--- a/mysql-test/t/type_float.test
+++ b/mysql-test/t/type_float.test
@@ -82,10 +82,12 @@ create table t1 (a float(200,100), b double(200,100));
#
# float in a char(1) field
#
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (c20 char);
insert into t1 values (5000.0);
insert into t1 values (0.5e4);
drop table t1;
+set sql_mode = DEFAULT;
# Errors
@@ -98,18 +100,18 @@ drop table if exists t1;
# Don't allow 'double unsigned' to be set to a negative value (Bug #7700)
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;
select * from t1;
drop table t1;
# Ensure that maximum values as the result of number of decimals
# being specified in table schema are enforced (Bug #7361)
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");
select * from t1;
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");
select * from t1;
drop table if exists t1;
@@ -241,14 +243,14 @@ 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);
select f1 + 0e0 from t1;
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);
select f1 + 0e0 from t1;
drop table t1;
@@ -339,8 +341,8 @@ select format(truncate('1.7976931348623157E+308',-12),1,'fr_BE') as foo;
CREATE TABLE t1 (f FLOAT);
INSERT INTO t1 VALUES ('1.');
-INSERT INTO t1 VALUES ('2.0.');
-INSERT INTO t1 VALUES ('.');
+INSERT IGNORE INTO t1 VALUES ('2.0.');
+INSERT IGNORE INTO t1 VALUES ('.');
SELECT * FROM t1 ORDER BY f;
DROP TABLE t1;
@@ -467,8 +469,8 @@ DROP TABLE t1;
--echo # MDEV-4102 Limitation on DOUBLE or REAL length is ignored with INSERT .. SELECT
--echo #
CREATE TABLE t1 (d1 DOUBLE(5,2), d2 DOUBLE(10,2));
-INSERT INTO t1 VALUES (10000000.55, 10000000.55);
-INSERT INTO t1 SELECT d2, d2 FROM t1;
+INSERT IGNORE INTO t1 VALUES (10000000.55, 10000000.55);
+INSERT IGNORE INTO t1 SELECT d2, d2 FROM t1;
SELECT * FROM t1;
DROP TABLE t1;
@@ -481,14 +483,14 @@ CREATE TABLE t1 (
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
);
--vertical_results
SELECT * FROM t1;
-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;
SELECT * FROM t1;
ALTER TABLE t1 ADD COLUMN i INT;
SELECT * FROM t1;
@@ -498,14 +500,14 @@ 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;
SELECT * FROM t1;
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;
SELECT * FROM t1;
DROP TABLE t1,t2;
diff --git a/mysql-test/t/type_newdecimal.test b/mysql-test/t/type_newdecimal.test
index 152c3ade487..eb0fac57150 100644
--- a/mysql-test/t/type_newdecimal.test
+++ b/mysql-test/t/type_newdecimal.test
@@ -50,13 +50,13 @@ drop table t1;
#
create table t1 (a decimal(4,2));
-insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
-insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
+insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1);
+insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
select a from t1;
drop table t1;
create table t1 (a decimal(4,2) unsigned);
-insert into t1 value (10000), (1.1e10), ("11111"), (100000.1);
-insert into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
+insert ignore into t1 value (10000), (1.1e10), ("11111"), (100000.1);
+insert ignore into t1 value (-10000), (-1.1e10), ("-11111"), (-100000.1);
select a from t1;
drop table t1;
@@ -65,21 +65,21 @@ drop table t1;
# saving in field with overflow from decimal
#
create table t1 (a bigint);
-insert into t1 values (18446744073709551615.0);
-insert into t1 values (9223372036854775808.0);
-insert into t1 values (-18446744073709551615.0);
+insert ignore into t1 values (18446744073709551615.0);
+insert ignore into t1 values (9223372036854775808.0);
+insert ignore into t1 values (-18446744073709551615.0);
select * from t1;
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 into t1 values (-1.0);
+insert ignore into t1 values (9999999999999999999999999.000);
+insert ignore into t1 values (-1.0);
select * from t1;
drop table t1;
create table t1 (a tinyint);
-insert into t1 values (18446744073709551615.0);
-insert into t1 values (9223372036854775808.0);
+insert ignore into t1 values (18446744073709551615.0);
+insert ignore into t1 values (9223372036854775808.0);
select * from t1;
drop table t1;
diff --git a/mysql-test/t/type_num.test b/mysql-test/t/type_num.test
index 64242e34160..87f5cc609d9 100644
--- a/mysql-test/t/type_num.test
+++ b/mysql-test/t/type_num.test
@@ -433,17 +433,17 @@ CREATE TABLE t1 (
);
INSERT INTO t1 VALUES ('1 ','1 ','1 ','1 ','1 ','1 ','1 ');
-INSERT INTO t1 VALUES ('','','','','','','');
-INSERT INTO t1 VALUES ('x','x','x','x','x','x','x');
-INSERT INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x');
-INSERT INTO t1 VALUES ('.','.','.','.','.','.','.');
-INSERT INTO t1 VALUES ('-','-','-','-','-','-','-');
-INSERT INTO t1 VALUES ('+','+','+','+','+','+','+');
-INSERT INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x');
-INSERT INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e');
-INSERT INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-');
-INSERT INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+');
-INSERT INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000');
+INSERT IGNORE INTO t1 VALUES ('','','','','','','');
+INSERT IGNORE INTO t1 VALUES ('x','x','x','x','x','x','x');
+INSERT IGNORE INTO t1 VALUES (' x',' x',' x',' x',' x',' x',' x');
+INSERT IGNORE INTO t1 VALUES ('.','.','.','.','.','.','.');
+INSERT IGNORE INTO t1 VALUES ('-','-','-','-','-','-','-');
+INSERT IGNORE INTO t1 VALUES ('+','+','+','+','+','+','+');
+INSERT IGNORE INTO t1 VALUES ('1x','1x','1x','1x','1x','1x','1x');
+INSERT IGNORE INTO t1 VALUES ('1e','1e','1e','1e','1e','1e','1e');
+INSERT IGNORE INTO t1 VALUES ('1e-','1e-','1e-','1e-','1e-','1e-','1e-');
+INSERT IGNORE INTO t1 VALUES ('1E+','1E+','1E+','1E+','1E+','1E+','1E+');
+INSERT IGNORE INTO t1 VALUES ('1e1000','1e1000','1e1000','1e1000','1e1000','1e1000','1e1000');
DELETE FROM t1;
INSERT INTO t1 VALUES (0,0,0,0,0,0,0);
diff --git a/mysql-test/t/type_ranges.test b/mysql-test/t/type_ranges.test
index 44b0835fcae..2b02a47973b 100644
--- a/mysql-test/t/type_ranges.test
+++ b/mysql-test/t/type_ranges.test
@@ -56,17 +56,18 @@ CREATE INDEX test2 on t1 ( ulonglong,ulong) ;
CREATE INDEX test3 on t1 ( medium ) ;
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');
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 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 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 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,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,-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,-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,0);
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;
+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),
@@ -78,11 +79,14 @@ 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;
@@ -103,7 +107,7 @@ CREATE TABLE t2 (
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;
select * from t2;
@@ -120,7 +124,9 @@ drop table t2;
# Check CREATE ... SELECT
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t2 select * from t1;
+SET sql_mode = DEFAULT;
update t2 set string="changed" where auto=16;
# We mask out the Privileges column because it differs with embedded server
--replace_column 8 #
diff --git a/mysql-test/t/type_set.test b/mysql-test/t/type_set.test
index 16e4f42301d..0b6672f0c83 100644
--- a/mysql-test/t/type_set.test
+++ b/mysql-test/t/type_set.test
@@ -49,11 +49,13 @@ 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',
'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'));
+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',
'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','1'));
+SET sql_mode = DEFAULT;
show create table t1;
drop table t1;
diff --git a/mysql-test/t/type_temporal_innodb.test b/mysql-test/t/type_temporal_innodb.test
index ac5daca6508..3e168f3d4c4 100644
--- a/mysql-test/t/type_temporal_innodb.test
+++ b/mysql-test/t/type_temporal_innodb.test
@@ -12,7 +12,7 @@
SELECT TIME'00:00:00'='';
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);
SELECT * FROM t1 WHERE b='';
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
SELECT * FROM t1 WHERE a=b;
@@ -25,17 +25,20 @@ SELECT * FROM t1 WHERE a=b;
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
DROP TABLE t1;
-
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SELECT DATE'0000-00-00'='';
+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);
SELECT * FROM t1 WHERE b='';
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
SELECT * FROM t1 WHERE a=b;
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
SELECT * FROM t1 WHERE b='';
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
SELECT * FROM t1 WHERE a=b;
@@ -43,16 +46,21 @@ SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
DROP TABLE t1;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
SELECT TIMESTAMP'0000-00-00 00:00:00'='';
+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);
SELECT * FROM t1 WHERE b='';
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
SELECT * FROM t1 WHERE a=b;
SELECT 1 FROM t1 WHERE (SELECT a FROM t1 group by c) = b;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 ENGINE=MyISAM;
+SET sql_mode = DEFAULT;
+
SELECT * FROM t1 WHERE b='';
SELECT * FROM t1 IGNORE KEY (b) WHERE b='';
SELECT * FROM t1 WHERE a=b;
diff --git a/mysql-test/t/type_time.test b/mysql-test/t/type_time.test
index c4b93d6dbb2..7accaff7ab8 100644
--- a/mysql-test/t/type_time.test
+++ b/mysql-test/t/type_time.test
@@ -11,7 +11,9 @@ insert into t1 values("10:22:33"),("12:34:56.78"),(10),(1234),(123456.78),(12345
insert t1 values (30),(1230),("1230"),("12:30"),("12:30:35"),("1 12:30:31.32");
select * from t1;
# Test wrong values
+set sql_mode = '';
insert into t1 values("10.22.22"),(1234567),(123456789),(123456789.10),("10 22:22"),("12.45a");
+set sql_mode = default;
select * from t1;
drop table t1;
@@ -219,7 +221,9 @@ CREATE TABLE t1 (a TIME(6));
--error ER_TRUNCATED_WRONG_VALUE
INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
SET sql_mode=DEFAULT;
+SET sql_mode='';
INSERT INTO t1 VALUES (CAST(0xFFFFFFFF00000000 AS UNSIGNED));
+SET sql_mode= DEFAULT;
SELECT * FROM t1;
DROP TABLE t1;
SELECT TIME'00:00:00'> CAST(0xFFFFFFFF00000000 AS UNSIGNED);
@@ -490,6 +494,7 @@ DROP TABLE t1;
SET timestamp=DEFAULT;
+SET @@sql_mode='';
SET @@old_mode=zero_date_time_cast;
--echo # TIMESTAMP literal, old mode
CREATE TABLE t1 (a TIME);
@@ -533,6 +538,7 @@ SELECT * FROM t1 WHERE a='0000-00-01 10:20:30' AND LENGTH(a)=30+RAND();
DROP TABLE t1;
SET @@old_mode=DEFAULT;
+SET @@sql_mode=DEFAULT;
--echo #
--echo # MDEV-8706 Wrong result for SELECT..WHERE time_column=TIMESTAMP'2015-08-30 00:00:00' AND time_column='00:00:00'
@@ -740,7 +746,9 @@ CREATE TABLE t1 (a YEAR, b TIME, c YEAR);
CREATE TABLE t2 (a YEAR);
INSERT INTO t2 VALUES (0),(1999),(2000),(2030),(2050),(2070);
INSERT INTO t1 (a,b,c) SELECT a,a,a FROM t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t1 MODIFY c TIME;
+SET sql_mode = DEFAULT;
SELECT * FROM t1;
DROP TABLE t1,t2;
diff --git a/mysql-test/t/type_timestamp.test b/mysql-test/t/type_timestamp.test
index 460769f8961..21dca6e1565 100644
--- a/mysql-test/t/type_timestamp.test
+++ b/mysql-test/t/type_timestamp.test
@@ -72,13 +72,13 @@ drop table t1;
# (for both strings and numbers)
#
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);
select ix+0 from t1;
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");
select ix+0 from t1;
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");
select ix+0 from t1;
drop table t1;
@@ -88,37 +88,47 @@ 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;
# Let us test TIMESTAMP auto-update behaviour
# Also we will test behaviour of TIMESTAMP field in SHOW CREATE TABLE and
# behaviour of DEFAULT literal for such fields
+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 ();
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);
select * from t1;
show create table t1;
show columns from t1;
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 ();
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);
select * from t1;
show create table t1;
show columns from t1;
@@ -150,14 +160,16 @@ show create table t1;
show columns from t1;
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 ();
select * from t1;
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);
select * from t1;
show create table t1;
show columns from t1;
@@ -266,7 +278,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;
drop table t1;
@@ -537,7 +551,7 @@ DROP TABLE t1,t2;
--echo # MDEV-7831 Bad warning for DATE_ADD(timestamp_column, INTERVAL 10 SECOND)
--echo #
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');
SELECT DATE_ADD(a, INTERVAL 10 SECOND) FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/t/type_timestamp_hires.test b/mysql-test/t/type_timestamp_hires.test
index 0b05f81ef42..5db3f9bd1a3 100644
--- a/mysql-test/t/type_timestamp_hires.test
+++ b/mysql-test/t/type_timestamp_hires.test
@@ -29,6 +29,7 @@ create or replace table t1 (a timestamp(5) default current_timestamp(5));
show create table t1;
create or replace table t1 (a timestamp(5) default current_timestamp(6));
show create table t1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
create or replace table t1 (a timestamp(5) on update current_timestamp);
show create table t1;
create or replace table t1 (a timestamp(5) on update current_timestamp());
@@ -40,3 +41,4 @@ show create table t1;
create or replace table t1 (a timestamp(5) on update current_timestamp(6));
show create table t1;
drop table t1;
+set sql_mode = default;
diff --git a/mysql-test/t/type_uint.test b/mysql-test/t/type_uint.test
index 84fca993d09..ae48b30997a 100644
--- a/mysql-test/t/type_uint.test
+++ b/mysql-test/t/type_uint.test
@@ -9,8 +9,8 @@ SET SQL_WARNINGS=1;
create table t1 (this int unsigned);
insert into t1 values (1);
-insert into t1 values (-1);
-insert into t1 values ('5000000000');
+insert ignore into t1 values (-1);
+insert ignore into t1 values ('5000000000');
select * from t1;
drop table t1;
diff --git a/mysql-test/t/type_year.test b/mysql-test/t/type_year.test
index 22f164a757c..f7fd4fc27c0 100644
--- a/mysql-test/t/type_year.test
+++ b/mysql-test/t/type_year.test
@@ -17,7 +17,7 @@ drop table t1;
#
create table t1 (y year);
-insert into t1 values (now());
+insert ignore into t1 values (now());
select if(y = now(), 1, 0) from t1;
drop table t1;
@@ -138,7 +138,7 @@ DROP TABLE t2, t4;
--echo #
CREATE TABLE t1 (y YEAR NOT NULL, s VARCHAR(4));
-INSERT INTO t1 (s) VALUES ('bad');
+INSERT IGNORE INTO t1 (s) VALUES ('bad');
INSERT INTO t1 (y, s) VALUES (0, 0), (2000, 2000), (2001, 2001);
SELECT * FROM t1 ta, t1 tb WHERE ta.y = tb.y;
@@ -219,33 +219,37 @@ DROP TABLE t1;
--echo # MDEV-9392 Copying from DECIMAL to YEAR is not consistent about warnings
--echo #
CREATE TABLE t1 (a YEAR);
-INSERT INTO t1 VALUES (-0.1);
+INSERT IGNORE INTO t1 VALUES (-0.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;
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;
+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);
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;
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;
+SET sql_mode = DEFAULT;
DROP TABLE t1;
diff --git a/mysql-test/t/union.test b/mysql-test/t/union.test
index 151512515b9..ecc90972563 100644
--- a/mysql-test/t/union.test
+++ b/mysql-test/t/union.test
@@ -582,6 +582,7 @@ drop table t1;
#
# parser stack overflow
#
+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));
@@ -610,6 +611,7 @@ PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1) UNION
(SELECT * FROM t1 AS PARTITIONED, t2 AS
PARTITIONED_B WHERE PARTITIONED_B.ID=PARTITIONED.ID1);
drop table t1,t2;
+SET sql_mode = DEFAULT;
#
# merging ENUM and SET fields in one UNION
@@ -884,10 +886,12 @@ drop table t1;
#
# Bug#12185: Data type aggregation may produce wrong result
#
+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;
drop table t1, t2;
+set sql_mode = default;
#
# Bug#18175: Union select over 129 tables with a sum function fails.
diff --git a/mysql-test/t/update.test b/mysql-test/t/update.test
index e5ef0b11127..5d834e69715 100644
--- a/mysql-test/t/update.test
+++ b/mysql-test/t/update.test
@@ -322,6 +322,7 @@ drop table t1;
# Bug #24035: performance degradation with condition int_field=big_decimal
#
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t1 (
request_id int unsigned NOT NULL auto_increment,
user_id varchar(12) default NULL,
@@ -340,6 +341,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;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index af509eb7b85..be7e5c56ea3 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -1222,6 +1222,7 @@ drop table t1;
#
# changing value by trigger and CHECK OPTION
#
+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;
@@ -1232,7 +1233,7 @@ select * from t1;
drop trigger t1_bi;
drop view v1;
drop table t1;
-
+SET sql_mode = default;
#
# CASCADED should be used for all underlaying VIEWs
#
@@ -2678,7 +2679,7 @@ 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);
SET SQL_MODE = STRICT_ALL_TABLES;
--error ER_NO_DEFAULT_FOR_VIEW_FIELD
@@ -3571,7 +3572,7 @@ DROP TABLE t1;
--echo #
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);
set @old_mode=@@sql_mode;
set @@sql_mode=traditional;
--error ER_NO_DEFAULT_FOR_VIEW_FIELD
diff --git a/mysql-test/t/warnings.test b/mysql-test/t/warnings.test
index 29714438835..de26f2247fd 100644
--- a/mysql-test/t/warnings.test
+++ b/mysql-test/t/warnings.test
@@ -21,11 +21,11 @@ create table t (i);
show count(*) errors;
show errors;
insert into t1 values (1);
-insert into t1 values ("hej");
-insert into t1 values ("hej"),("då");
+insert ignore into t1 values ("hej");
+insert ignore into t1 values ("hej"),("då");
set SQL_WARNINGS=1;
-insert into t1 values ("hej");
-insert into t1 values ("hej"),("då");
+insert ignore into t1 values ("hej");
+insert ignore into t1 values ("hej"),("då");
drop table t1;
set SQL_WARNINGS=0;
@@ -61,6 +61,7 @@ drop table t1;
# Warnings from basic INSERT, UPDATE and ALTER commands
#
+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');
alter table t1 modify c char(4);
@@ -75,6 +76,7 @@ set sql_warnings=1;
insert into t2(b) values('mysqlab');
set sql_warnings=0;
drop table t1, t2;
+set sql_mode = default;
#
# Test for max_error_count
@@ -93,7 +95,7 @@ commit;
--enable_query_log
alter table t1 add b char;
set max_error_count=10;
-update t1 set b=a;
+update ignore t1 set b=a;
--disable_ps_protocol
select @@warning_count;
--enable_ps_protocol
@@ -101,7 +103,7 @@ select @@warning_count;
# Bug#9072
set max_error_count=0;
show variables like 'max_error_count';
-update t1 set b='hi';
+update ignore t1 set b='hi';
--disable_ps_protocol
select @@warning_count;
--enable_ps_protocol
@@ -119,7 +121,7 @@ drop table t1;
create table t1 (a int);
insert into t1 (a) values (1), (2), (3), (4), (5), (6), (7), (8), (9), (10);
# should generate 10 warnings
-update t1 set a='abc';
+update ignore t1 set a='abc';
show warnings limit 2, 1;
show warnings limit 0, 10;
show warnings limit 9, 1;
@@ -152,6 +154,7 @@ INSERT INTO t3 VALUES ( 'a`', 'a`', '1000-01-1' );
DROP PROCEDURE IF EXISTS sp1;
DROP PROCEDURE IF EXISTS sp2;
DROP PROCEDURE IF EXISTS sp3;
+SET sql_mode = '';
delimiter //;
CREATE PROCEDURE sp1()
BEGIN
@@ -172,8 +175,10 @@ delimiter ;//
CALL sp1();
CALL sp2();
CALL sp3();
+SET sql_mode = DEFAULT;
DROP PROCEDURE IF EXISTS sp1;
+SET sql_mode = '';
delimiter //;
CREATE PROCEDURE sp1()
BEGIN
@@ -182,6 +187,7 @@ SELECT f1 into x from t2 limit 1;
END//
delimiter ;//
CALL sp1();
+SET sql_mode = DEFAULT;
DROP TABLE t1;
DROP TABLE t2;
DROP TABLE t3;
diff --git a/mysql-test/t/xtradb_mrr.test b/mysql-test/t/xtradb_mrr.test
index b56cbb0459f..e43017c9d24 100644
--- a/mysql-test/t/xtradb_mrr.test
+++ b/mysql-test/t/xtradb_mrr.test
@@ -91,7 +91,7 @@ CREATE TABLE t1 (
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'),
@@ -403,7 +403,7 @@ INSERT INTO t1 VALUES
('IB','IBM- Inc.'),
('GO','Google Inc.');
-INSERT INTO t2 VALUES
+INSERT IGNORE INTO t2 VALUES
('AB','Sweden'),
('JA','USA'),
('MS','United States of America'),
diff --git a/storage/connect/mysql-test/connect/r/dir.result b/storage/connect/mysql-test/connect/r/dir.result
index 34a591fb26c..d682455d86c 100644
--- a/storage/connect/mysql-test/connect/r/dir.result
+++ b/storage/connect/mysql-test/connect/r/dir.result
@@ -25,8 +25,10 @@ SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size;
fname ftype size
boys .txt 282
boyswin .txt 288
+SET sql_mode = '';
INSERT INTO t1 VALUES ('','','','');
ERROR HY000: Got error 174 'COLBLK SetBuffer: undefined Access Method' from CONNECT
+SET sql_mode = DEFAULT;
DROP TABLE t1;
CREATE TABLE t1 ENGINE=CONNECT TABLE_TYPE=DIR FILE_NAME='*.txt';
ERROR HY000: Cannot get column info for table type DIR
diff --git a/storage/connect/mysql-test/connect/r/mysql_exec.result b/storage/connect/mysql-test/connect/r/mysql_exec.result
index b6606ab5978..fdf385333ca 100644
--- a/storage/connect/mysql-test/connect/r/mysql_exec.result
+++ b/storage/connect/mysql-test/connect/r/mysql_exec.result
@@ -16,7 +16,7 @@ message VARCHAR(255) FLAG=2)
ENGINE=CONNECT TABLE_TYPE=MYSQL CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test' OPTION_LIST='Execsrc=1,maxerr=2';
SELECT * FROM t1 WHERE command IN ('Warning','Note',
'drop table if exists t1',
-'create table t1 (id int key auto_increment, msg varchar(32) not null)',
+'create table t1 (id int key auto_increment, msg varchar(32))',
"insert into t1(msg) values('One'),(NULL),('Three')",
"insert into t1 values(2,'Deux') on duplicate key update msg = 'Two'",
"insert into t1(message) values('Four'),('Five'),('Six')",
@@ -26,13 +26,11 @@ SELECT * FROM t1 WHERE command IN ('Warning','Note',
command warnings number message
drop table if exists t1 1 0 Affected rows
Note 0 1051 Unknown table 'test.t1'
-create table t1 (id int key auto_increment, msg varchar(32) not null) 0 0 Affected rows
-insert into t1(msg) values('One'),(NULL),('Three') 1 3 Affected rows
-Warning 0 1048 Column 'msg' cannot be null
+create table t1 (id int key auto_increment, msg varchar(32)) 0 0 Affected rows
+insert into t1(msg) values('One'),(NULL),('Three') 0 3 Affected rows
insert into t1 values(2,'Deux') on duplicate key update msg = 'Two' 0 2 Affected rows
insert into t1(message) values('Four'),('Five'),('Six') 0 1054 Remote: Unknown column 'message' in 'field list'
-insert into t1(id) values(NULL) 1 1 Affected rows
-Warning 0 1364 Field 'msg' doesn't have a default value
+insert into t1(id) values(NULL) 0 1 Affected rows
update t1 set msg = 'Four' where id = 4 0 1 Affected rows
select * from t1 0 2 Result set columns
#
@@ -46,8 +44,7 @@ READS SQL DATA
SELECT * FROM t1 WHERE command IN ('Warning','Note',cmd);
CALL p1('insert into t1(id) values(NULL)');
command warnings number message
-insert into t1(id) values(NULL) 1 1 Affected rows
-Warning 0 1364 Field 'msg' doesn't have a default value
+insert into t1(id) values(NULL) 0 1 Affected rows
CALL p1('update t1 set msg = "Five" where id = 5');
command warnings number message
update t1 set msg = "Five" where id = 5 0 1 Affected rows
diff --git a/storage/connect/mysql-test/connect/r/mysql_new.result b/storage/connect/mysql-test/connect/r/mysql_new.result
index 9236ee691e5..69402ff7532 100644
--- a/storage/connect/mysql-test/connect/r/mysql_new.result
+++ b/storage/connect/mysql-test/connect/r/mysql_new.result
@@ -203,7 +203,7 @@ t1 CREATE TABLE `t1` (
`d` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
`e` year(4) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
-INSERT INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23');
+INSERT IGNORE INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23');
Warnings:
Note 1265 Data truncated for column 'a' at row 1
Note 1265 Data truncated for column 'c' at row 1
diff --git a/storage/connect/mysql-test/connect/r/unsigned.result b/storage/connect/mysql-test/connect/r/unsigned.result
index b993133a3c4..ca5a5ffe31e 100644
--- a/storage/connect/mysql-test/connect/r/unsigned.result
+++ b/storage/connect/mysql-test/connect/r/unsigned.result
@@ -27,13 +27,13 @@ UPDATE t1 SET e = d;
SELECT * FROM t1;
a b c d e
255 65535 4294967295 18446744073709551615 18446744073709551615
-UPDATE t1 SET c = d;
+UPDATE IGNORE t1 SET c = d;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
SELECT * FROM t1;
a b c d e
255 65535 4294967295 18446744073709551615 18446744073709551615
-UPDATE t1 SET c = e;
+UPDATE IGNORE t1 SET c = e;
Warnings:
Warning 1264 Out of range value for column 'c' at row 1
SELECT * FROM t1;
diff --git a/storage/connect/mysql-test/connect/r/upd.result b/storage/connect/mysql-test/connect/r/upd.result
index fa519c4b688..8faf00896bb 100644
--- a/storage/connect/mysql-test/connect/r/upd.result
+++ b/storage/connect/mysql-test/connect/r/upd.result
@@ -1,3 +1,4 @@
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE employee
(
serialno CHAR(5) NOT NULL,
@@ -1625,3 +1626,4 @@ serialno name sex title manager department secretary salary
#
DROP PROCEDURE test.tst_up;
DROP TABLE employee;
+SET sql_mode = DEFAULT;
diff --git a/storage/connect/mysql-test/connect/t/dir.test b/storage/connect/mysql-test/connect/t/dir.test
index fb69813d9f0..fdcedf6c2bd 100644
--- a/storage/connect/mysql-test/connect/t/dir.test
+++ b/storage/connect/mysql-test/connect/t/dir.test
@@ -24,9 +24,11 @@ SHOW CREATE TABLE t1;
--replace_result $MYSQLD_DATADIR DATADIR/
SELECT fname, ftype, size FROM t1 ORDER BY fname, ftype, size;
+SET sql_mode = '';
# TODO: add a better error message
--error ER_GET_ERRMSG
INSERT INTO t1 VALUES ('','','','');
+SET sql_mode = DEFAULT;
DROP TABLE t1;
diff --git a/storage/connect/mysql-test/connect/t/mysql_exec.test b/storage/connect/mysql-test/connect/t/mysql_exec.test
index 9226592eded..2fab0ee0a93 100644
--- a/storage/connect/mysql-test/connect/t/mysql_exec.test
+++ b/storage/connect/mysql-test/connect/t/mysql_exec.test
@@ -15,7 +15,7 @@ eval CREATE TABLE t1 (
SELECT * FROM t1 WHERE command IN ('Warning','Note',
'drop table if exists t1',
- 'create table t1 (id int key auto_increment, msg varchar(32) not null)',
+ 'create table t1 (id int key auto_increment, msg varchar(32))',
"insert into t1(msg) values('One'),(NULL),('Three')",
"insert into t1 values(2,'Deux') on duplicate key update msg = 'Two'",
"insert into t1(message) values('Four'),('Five'),('Six')",
diff --git a/storage/connect/mysql-test/connect/t/mysql_new.test b/storage/connect/mysql-test/connect/t/mysql_new.test
index de9cae7b87b..db9b1b704fc 100644
--- a/storage/connect/mysql-test/connect/t/mysql_new.test
+++ b/storage/connect/mysql-test/connect/t/mysql_new.test
@@ -306,7 +306,7 @@ DROP TABLE t1;
CREATE TABLE t1 (a date, b datetime, c time, d timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, e year);
SHOW CREATE TABLE t1;
-INSERT INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23');
+INSERT IGNORE INTO t1 VALUES('2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23','2003-05-27 10:45:23');
SELECT * FROM t1;
connection master;
diff --git a/storage/connect/mysql-test/connect/t/unsigned.test b/storage/connect/mysql-test/connect/t/unsigned.test
index 44eb832f8ae..48f6bdc835c 100644
--- a/storage/connect/mysql-test/connect/t/unsigned.test
+++ b/storage/connect/mysql-test/connect/t/unsigned.test
@@ -13,9 +13,9 @@ INSERT INTO t1(a,b,c,d) VALUES(255,65535,4294967295,18446744073709551615);
SELECT * FROM t1;
UPDATE t1 SET e = d;
SELECT * FROM t1;
-UPDATE t1 SET c = d;
+UPDATE IGNORE t1 SET c = d;
SELECT * FROM t1;
-UPDATE t1 SET c = e;
+UPDATE IGNORE t1 SET c = e;
SELECT * FROM t1;
UPDATE t1 SET d = e;
SELECT * FROM t1;
diff --git a/storage/connect/mysql-test/connect/t/upd.test b/storage/connect/mysql-test/connect/t/upd.test
index a3716694c4a..28b566b5641 100644
--- a/storage/connect/mysql-test/connect/t/upd.test
+++ b/storage/connect/mysql-test/connect/t/upd.test
@@ -1,6 +1,8 @@
let $MYSQLD_DATADIR= `select @@datadir`;
--copy_file $MTR_SUITE_DIR/std_data/employee.dat $MYSQLD_DATADIR/test/employee.dat
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
+
CREATE TABLE employee
(
serialno CHAR(5) NOT NULL,
@@ -150,4 +152,6 @@ CALL test.tst_up();
DROP PROCEDURE test.tst_up;
DROP TABLE employee;
+SET sql_mode = DEFAULT;
+
--remove_file $MYSQLD_DATADIR/test/employee.dat
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result
index 31906776bf4..c8360f2fbfa 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/alter_table_change_column_rename_multiple.result
@@ -24,7 +24,7 @@ diaries CREATE TABLE `diaries` (
`subject` text DEFAULT NULL,
PRIMARY KEY (`internal_id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
-INSERT INTO diaries (subject, description)
+INSERT IGNORE INTO diaries (subject, description)
VALUES ("groonga (1)", "starting groonga.");
Warnings:
Warning 1364 Field 'internal_id' doesn't have a default value
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result
index b2364e1158e..9a979f571ee 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_date_zero_date.result
@@ -10,12 +10,18 @@ timestamps CREATE TABLE `timestamps` (
`create_dt` date DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
+SET sql_mode = '';
INSERT INTO timestamps (create_dt) VALUES ("2012-00-01");
Warnings:
Warning 1265 Data truncated for column 'create_dt' at row 1
INSERT INTO timestamps (create_dt) VALUES ("2012-01-00");
Warnings:
Warning 1265 Data truncated for column 'create_dt' at row 1
+SET sql_mode = DEFAULT;
+INSERT INTO timestamps (create_dt) VALUES ("2012-00-01");
+ERROR 22007: Incorrect date value: '2012-00-01' for column 'create_dt' at row 1
+INSERT INTO timestamps (create_dt) VALUES ("2012-01-00");
+ERROR 22007: Incorrect date value: '2012-01-00' for column 'create_dt' at row 1
SELECT * FROM timestamps;
id create_dt
1 2012-01-01
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result
index 7cca8d2f83e..c287abd79de 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_64bit_version_56_or_later_out_of_range.result
@@ -12,11 +12,14 @@ diaries CREATE TABLE `diaries` (
`created_at` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
-INSERT INTO diaries (title, created_at)
-VALUES ('2012', '2012');
+SET sql_mode = '';
+INSERT INTO diaries (title, created_at) VALUES ('2012', '2012');
Warnings:
Warning 1265 Data truncated for column 'created_at' at row 1
Warning 1265 Data truncated for column 'created_at' at row 1
+SET sql_mode = DEFAULT;
+INSERT INTO diaries (title, created_at) VALUES ('2012', '2012');
+ERROR 22007: Incorrect datetime value: '2012' for column 'created_at' at row 1
SELECT * FROM diaries;
id title created_at
1 2012 0000-01-01 00:00:00
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result
index c22a63f9744..4e05f0a2c52 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_datetime_zero_date.result
@@ -10,12 +10,14 @@ timestamps CREATE TABLE `timestamps` (
`create_dt` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=Mroonga DEFAULT CHARSET=utf8
+SET sql_mode='';
INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00");
Warnings:
Warning 1265 Data truncated for column 'create_dt' at row 1
INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00");
Warnings:
Warning 1265 Data truncated for column 'create_dt' at row 1
+SET sql_mode = DEFAULT;
SELECT * FROM timestamps;
id create_dt
1 2012-01-01 00:00:00
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result
index cd75598a7ee..e9e12878fc9 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_fractional_seconds_with_index.result
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS diaries;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -6,6 +7,7 @@ created_at TIMESTAMP(6),
updated_at TIMESTAMP(6),
KEY (updated_at)
) DEFAULT CHARSET UTF8;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result
index 3f93ce03ca6..82e62c27f32 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/column_timestamp_with_index.result
@@ -1,4 +1,5 @@
DROP TABLE IF EXISTS diaries;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -6,6 +7,7 @@ created_at TIMESTAMP,
updated_at TIMESTAMP,
KEY (updated_at)
) DEFAULT CHARSET UTF8;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE diaries;
Table Create Table
diaries CREATE TABLE `diaries` (
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
index 5e831860c5e..fc16c590dc0 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/geometry_bulk_insert_null.result
@@ -2,7 +2,7 @@ DROP TABLE IF EXISTS shops;
CREATE TABLE shops (
location GEOMETRY NOT NULL
);
-INSERT INTO shops VALUES (NULL), (NULL);
+INSERT IGNORE INTO shops VALUES (NULL), (NULL);
Warnings:
Warning 1048 Column 'location' cannot be null
Warning 1048 Column 'location' cannot be null
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result
index 508ee135ef2..b27c0ee028c 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_hash_id_primary.result
@@ -2,16 +2,16 @@ drop table if exists t1, t2, t3;
create table t1 (_id int, a int, primary key (_id) using hash);
insert into t1 values(null, 100);
ERROR 23000: Column '_id' cannot be null
-insert into t1 values(1,100);
+insert ignore into t1 values(1,100);
Warnings:
Warning 1265 Data truncated for column '_id' at row 1
-insert into t1 values(1,100);
+insert ignore into t1 values(1,100);
Warnings:
Warning 1265 Data truncated for column '_id' at row 1
-insert into t1 values(1,100);
+insert ignore into t1 values(1,100);
Warnings:
Warning 1265 Data truncated for column '_id' at row 1
-insert into t1 values(1,100);
+insert ignore into t1 values(1,100);
Warnings:
Warning 1265 Data truncated for column '_id' at row 1
select * from t1;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result
index 86b06bc94dd..ff2f975f94f 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_primary_update.result
@@ -22,7 +22,7 @@ Jiro Yamada 27
Taro Yamada -12
Taro Yamada 10
Taro Yamada 29
-update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27;
+update ignore scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27;
Warnings:
Warning 1265 data truncated for primary key column: <name>
select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29);
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result
index 155faf85510..d0325c47933 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.result
@@ -5,6 +5,7 @@ start datetime,
end datetime,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = '';
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
Warnings:
Warning 1265 Data truncated for column 'start' at row 1
@@ -18,4 +19,5 @@ Warning 1265 Data truncated for column 'start' at row 1
SELECT * FROM ranges;
id start end
1 1990-01-01 00:00:00 2012-10-05 23:59:59
+SET sql_mode = DEFAULT;
DROP TABLE ranges;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result
index d833fb44024..7c993eb564e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_index_read.result
@@ -1,10 +1,12 @@
DROP TABLE IF EXISTS ranges;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2038-01-18 15:14:07");
INSERT INTO ranges VALUES (3, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result
index 1e4ee102c9e..a040ab1ed0e 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_asc.result
@@ -1,10 +1,12 @@
DROP TABLE IF EXISTS ranges;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result
index 23a5522320a..27f2ce3c9a8 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_order_desc.result
@@ -1,10 +1,12 @@
DROP TABLE IF EXISTS ranges;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
INSERT INTO ranges VALUES (3, "2038-01-18 15:14:07", "1970-01-01 12:00:00");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result
index 3f3277f5e64..0494044adea 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result
+++ b/storage/mroonga/mysql-test/mroonga/storage/r/index_multiple_column_unique_timestamp_reinsert.result
@@ -1,10 +1,12 @@
DROP TABLE IF EXISTS ranges;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;
id start end
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test
index a9bbe403da1..ee25b482daa 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/alter_table_change_column_rename_multiple.test
@@ -34,7 +34,7 @@ ALTER TABLE diaries
CHANGE id internal_id INT;
SHOW CREATE TABLE diaries;
-INSERT INTO diaries (subject, description)
+INSERT IGNORE INTO diaries (subject, description)
VALUES ("groonga (1)", "starting groonga.");
SELECT * FROM diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test
index b6225075959..1df98cc1830 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_date_zero_date.test
@@ -26,8 +26,14 @@ CREATE TABLE timestamps (
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE timestamps;
+SET sql_mode = '';
INSERT INTO timestamps (create_dt) VALUES ("2012-00-01");
INSERT INTO timestamps (create_dt) VALUES ("2012-01-00");
+SET sql_mode = DEFAULT;
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO timestamps (create_dt) VALUES ("2012-00-01");
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO timestamps (create_dt) VALUES ("2012-01-00");
SELECT * FROM timestamps;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test
index 18b501178bc..243512fd2ae 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_64bit_version_56_or_later_out_of_range.test
@@ -32,8 +32,11 @@ CREATE TABLE diaries (
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE diaries;
-INSERT INTO diaries (title, created_at)
- VALUES ('2012', '2012');
+SET sql_mode = '';
+INSERT INTO diaries (title, created_at) VALUES ('2012', '2012');
+SET sql_mode = DEFAULT;
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO diaries (title, created_at) VALUES ('2012', '2012');
SELECT * FROM diaries;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test
index 5c39086d452..c41344cf655 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_datetime_zero_date.test
@@ -26,8 +26,10 @@ CREATE TABLE timestamps (
) DEFAULT CHARSET UTF8;
SHOW CREATE TABLE timestamps;
+SET sql_mode='';
INSERT INTO timestamps (create_dt) VALUES ("2012-00-01 00:00:00");
INSERT INTO timestamps (create_dt) VALUES ("2012-01-00 00:00:00");
+SET sql_mode = DEFAULT;
SELECT * FROM timestamps;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test
index 6f5e0116eb7..e9398534d88 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_fractional_seconds_with_index.test
@@ -22,6 +22,7 @@
DROP TABLE IF EXISTS diaries;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -29,6 +30,7 @@ CREATE TABLE diaries (
updated_at TIMESTAMP(6),
KEY (updated_at)
) DEFAULT CHARSET UTF8;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE diaries;
INSERT INTO diaries (title, created_at, updated_at)
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test
index ae78befc466..9cd5aefc4c1 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/column_timestamp_with_index.test
@@ -20,6 +20,7 @@
DROP TABLE IF EXISTS diaries;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE diaries (
id INT PRIMARY KEY AUTO_INCREMENT,
title TEXT,
@@ -27,6 +28,7 @@ CREATE TABLE diaries (
updated_at TIMESTAMP,
KEY (updated_at)
) DEFAULT CHARSET UTF8;
+SET sql_mode = DEFAULT;
SHOW CREATE TABLE diaries;
INSERT INTO diaries (title, created_at, updated_at)
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
index a5f42e2c9f3..dc9ac4319ce 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/geometry_bulk_insert_null.test
@@ -27,7 +27,7 @@ CREATE TABLE shops (
location GEOMETRY NOT NULL
);
-INSERT INTO shops VALUES (NULL), (NULL);
+INSERT IGNORE INTO shops VALUES (NULL), (NULL);
SELECT ST_AsText(location) FROM shops;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test
index 60ca970aa45..6aa4e04f7c8 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_hash_id_primary.test
@@ -23,10 +23,10 @@ drop table if exists t1, t2, t3;
create table t1 (_id int, a int, primary key (_id) using hash);
--error ER_BAD_NULL_ERROR
insert into t1 values(null, 100);
-insert into t1 values(1,100);
-insert into t1 values(1,100);
-insert into t1 values(1,100);
-insert into t1 values(1,100);
+insert ignore into t1 values(1,100);
+insert ignore into t1 values(1,100);
+insert ignore into t1 values(1,100);
+insert ignore into t1 values(1,100);
select * from t1;
select * from t1 where _id = 2;
select * from t1 where _id = 20;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test
index 26c76dd5207..c0f1e78552a 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_primary_update.test
@@ -32,7 +32,7 @@ insert into scores (name, score) values("Taro Yamada", -12);
insert into scores (name, score) values("Jiro Yamada", 27);
insert into scores (name, score) values("Taro Yamada", 10);
select * from scores;
-update scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27;
+update ignore scores set name = "Taro Yamada" where name = "Jiro Yamada" and score = 27;
select * from scores where name = "Taro Yamada" and (score >= -12 and score < 29);
drop table scores;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test
index 2782fc15363..031edd6d289 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_datetime_insert_delete_insert_invalid_value.test
@@ -27,12 +27,14 @@ CREATE TABLE ranges (
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = '';
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;
DELETE FROM ranges WHERE id = 1;
INSERT INTO ranges VALUES (1, "1990-00-00 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;
+SET sql_mode = DEFAULT;
DROP TABLE ranges;
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test
index c660f6aef6e..58f30ad5dcf 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_index_read.test
@@ -21,12 +21,14 @@
DROP TABLE IF EXISTS ranges;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2038-01-18 15:14:07");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test
index 5ec630b56df..af30c1829cb 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_asc.test
@@ -22,12 +22,14 @@
DROP TABLE IF EXISTS ranges;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test
index 9ca7440da88..eefa7cf70cd 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_order_desc.test
@@ -22,12 +22,14 @@
DROP TABLE IF EXISTS ranges;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2012-10-25 16:18:29", "2038-01-18 15:14:07");
INSERT INTO ranges VALUES (2, "1970-01-01 12:00:00", "2012-10-05 16:18:29");
diff --git a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test
index 559cf958804..ea4dd65c5bf 100644
--- a/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test
+++ b/storage/mroonga/mysql-test/mroonga/storage/t/index_multiple_column_unique_timestamp_reinsert.test
@@ -21,12 +21,14 @@
DROP TABLE IF EXISTS ranges;
--enable_warnings
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE ranges (
id int PRIMARY KEY,
start timestamp,
end timestamp,
UNIQUE KEY range_key(start, end)
);
+SET sql_mode = DEFAULT;
INSERT INTO ranges VALUES (1, "2010-01-01 00:00:00", "2012-10-05 23:59:59");
SELECT * FROM ranges;
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result
index 58291bc7fd1..402e4068731 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_master_tokudb.result
@@ -191,11 +191,11 @@ INSERT into t3 set f1=1, f2=1, f3=1, f4='first', f10='f10: some var char';
INSERT into t4 set f1=1, f2=1, f3=1, f4='first', f7='f7: medium size blob', f10='f10:
binary data';
INSERT into t31 set f1=1, f2=1, f3=1, f4='first';
-INSERT into t31 set f1=1, f2=1, f3=2, f4='second',
+INSERT ignore into t31 set f1=1, f2=1, f3=2, f4='second',
f9=2.2, f10='seven samurai', f28=222.222, f35='222';
Warnings:
Warning 1366 Incorrect integer value: 'seven samurai' for column 'f10' at row 1
-INSERT into t31 values (1, 1, 3, 'third',
+INSERT ignore into t31 values (1, 1, 3, 'third',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -231,7 +231,7 @@ INSERT into t31 values (1, 1, 3, 'third',
Warnings:
Warning 1264 Out of range value for column 'f5' at row 1
Warning 1264 Out of range value for column 'f24' at row 1
-INSERT into t31 values (1, 1, 4, 'fourth',
+INSERT ignore into t31 values (1, 1, 4, 'fourth',
/* f5 BIGINT, */ 333333333333333333333333,
/* f6 BLOB, */ '3333333333333333333333',
/* f7 DATE, */ '2007-07-18',
@@ -409,7 +409,7 @@ connection master;
update t31 set f5=555555555555555 where f3=6;
update t31 set f2=2 where f3=2;
update t31 set f1=NULL where f3=1;
-update t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
+update ignore t31 set f3=NULL, f27=NULL, f35='f35 new value' where f3=3;
Warnings:
Warning 1048 Column 'f3' cannot be null
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
index 6caa51128f9..b2142e25796 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_extra_col_slave_tokudb.result
@@ -199,10 +199,12 @@ connection slave;
*** Create t7 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t7 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e CHAR(20) DEFAULT 'Extra Column Testing')
ENGINE='TokuDB';
+SET sql_mode = DEFAULT;
*** Create t7 on Master ***
connection master;
CREATE TABLE t7 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
@@ -235,9 +237,11 @@ connection slave;
*** Create t8 on slave ***
STOP SLAVE;
RESET SLAVE;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t8 (a INT KEY, b BLOB, c CHAR(5),
d TIMESTAMP NULL DEFAULT '0000-00-00 00:00:00',
e INT)ENGINE='TokuDB';
+SET sql_mode = DEFAULT;
*** Create t8 on Master ***
connection master;
CREATE TABLE t8 (a INT PRIMARY KEY, b BLOB, c CHAR(5)
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_not_null_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_not_null_tokudb.result
index 66aaaa6b6fa..e7240afd790 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_not_null_tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_not_null_tokudb.result
@@ -19,11 +19,15 @@ CREATE TABLE t1(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
CREATE TABLE t2(`a` INT, `b` DATE DEFAULT NULL,
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t3(`a` INT, `b` DATE DEFAULT '0000-00-00',
`c` INT DEFAULT 500,
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE t4(`a` INT, `b` DATE DEFAULT '0000-00-00',
PRIMARY KEY(`a`)) ENGINE=TokuDB DEFAULT CHARSET=LATIN1;
+set sql_mode = DEFAULT;
************* EXECUTION WITH INSERTS *************
connection master;
INSERT INTO t1(a,b,c) VALUES (1, null, 1);
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result
index aa3c1ce50b9..1ebe6ba940b 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_basic_3tokudb.result
@@ -617,6 +617,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='TokuDB';
INSERT INTO t1 VALUES (1,8,5,'0000-00-00','0000-00-00','10:37:38','10:37:38','0000-00-00 00:00:00','0000-00-00 00:00:00','p','p'),(2,0,9,'0000-00-00','0000-00-00','00:00:00','00:00:00','2007-10-14 00:00:00','2007-10-14 00:00:00','d','d');
+ERROR 22007: Incorrect date value: '0000-00-00' for column 'date_key' at row 1
CREATE TABLE t2 (
`pk` int(11) NOT NULL AUTO_INCREMENT,
`int_nokey` int(11) NOT NULL,
@@ -637,6 +638,7 @@ KEY `datetime_key` (`datetime_key`),
KEY `varchar_key` (`varchar_key`)
) ENGINE='TokuDB';
INSERT INTO t2 VALUES (1,1,6,'2005-12-23','2005-12-23','02:24:28','02:24:28','0000-00-00 00:00:00','0000-00-00 00:00:00','g','g'),(2,0,3,'2009-09-14','2009-09-14','00:00:00','00:00:00','2000-01-30 16:39:40','2000-01-30 16:39:40','q','q'),(3,0,3,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','c','c'),(4,1,6,'2007-03-29','2007-03-29','15:49:00','15:49:00','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(5,4,0,'2002-12-04','2002-12-04','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','o','o'),(6,9,0,'2005-01-28','2005-01-28','00:00:00','00:00:00','2001-05-18 00:00:00','2001-05-18 00:00:00','w','w'),(7,6,0,'0000-00-00','0000-00-00','06:57:25','06:57:25','0000-00-00 00:00:00','0000-00-00 00:00:00','m','m'),(8,0,0,'0000-00-00','0000-00-00','00:00:00','00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','z','z'),(9,4,6,'2006-08-15','2006-08-15','00:00:00','00:00:00','2002-04-12 14:44:25','2002-04-12 14:44:25','j','j'),(10,0,5,'2006-12-20','2006-12-20','10:13:53','10:13:53','2008-07-22 00:00:00','2008-07-22 00:00:00','y','y'),(11,9,7,'0000-00-00','0000-00-00','00:00:00','00:00:00','2004-07-05 00:00:00','2004-07-05 00:00:00','{','{'),(12,4,3,'2007-01-26','2007-01-26','23:00:51','23:00:51','2001-05-16 00:00:00','2001-05-16 00:00:00','f','f'),(13,7,0,'2004-03-27','2004-03-27','00:00:00','00:00:00','2005-01-24 03:30:37','2005-01-24 03:30:37','',''),(14,6,0,'2006-07-26','2006-07-26','18:43:57','18:43:57','0000-00-00 00:00:00','0000-00-00 00:00:00','{','{'),(15,0,6,'2000-01-14','2000-01-14','00:00:00','00:00:00','2000-09-21 00:00:00','2000-09-21 00:00:00','o','o'),(16,9,8,'0000-00-00','0000-00-00','21:15:08','21:15:08','0000-00-00 00:00:00','0000-00-00 00:00:00','a','a'),(17,2,0,'2004-10-27','2004-10-27','00:00:00','00:00:00','2004-03-24 22:13:43','2004-03-24 22:13:43','',''),(18,7,4,'0000-00-00','0000-00-00','08:38:27','08:38:27','2002-03-18 19:51:44','2002-03-18 19:51:44','t','t'),(19,5,3,'2008-03-07','2008-03-07','03:29:07','03:29:07','2007-12-01 18:44:44','2007-12-01 18:44:44','t','t'),(20,0,0,'2002-04-09','2002-04-09','16:06:03','16:06:03','2009-04-22 00:00:00','2009-04-22 00:00:00','n','n');
+ERROR 22007: Incorrect datetime value: '0000-00-00 00:00:00' for column 'datetime_key' at row 1
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
UPDATE t1 SET `int_key` = 3 ORDER BY `pk` LIMIT 4;
DELETE FROM t2 WHERE `int_key` < 3 LIMIT 1;
@@ -644,7 +646,6 @@ DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `int_key` = 6 ORDER BY `pk` LIMIT 3;
DELETE FROM t2 WHERE `pk` < 6 LIMIT 1;
UPDATE t1 SET `pk` = 6 ORDER BY `int_key` LIMIT 6;
-ERROR 23000: Duplicate entry '6' for key 'PRIMARY'
DELETE FROM t2 WHERE `pk` < 7 LIMIT 1;
UPDATE t1 SET `int_key` = 4 ORDER BY `pk` LIMIT 6;
connection slave;
@@ -681,33 +682,33 @@ CREATE TABLE t1 (a bit) ENGINE='TokuDB';
INSERT IGNORE INTO t1 VALUES (NULL);
INSERT INTO t1 ( a ) VALUES ( 0 );
UPDATE t1 SET a = 0 WHERE a = 1 LIMIT 3;
-INSERT INTO t1 ( a ) VALUES ( 5 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
DELETE FROM t1 WHERE a < 2 LIMIT 4;
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 9 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 9 );
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 8 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 8 );
UPDATE t1 SET a = 0 WHERE a < 6 LIMIT 0;
-INSERT INTO t1 ( a ) VALUES ( 4 );
-INSERT INTO t1 ( a ) VALUES ( 3 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 4 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 3 );
UPDATE t1 SET a = 0 WHERE a = 7 LIMIT 6;
DELETE FROM t1 WHERE a = 4 LIMIT 7;
-UPDATE t1 SET a = 9 WHERE a < 2 LIMIT 9;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 2 LIMIT 9;
UPDATE t1 SET a = 0 WHERE a < 9 LIMIT 2;
DELETE FROM t1 WHERE a < 0 LIMIT 5;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 4 WHERE a < 6 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 5 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 8;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 4 WHERE a < 6 LIMIT 4;
+INSERT IGNORE INTO t1 ( a ) VALUES ( 5 );
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 8;
DELETE FROM t1 WHERE a < 8 LIMIT 8;
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
DELETE FROM t1 WHERE a < 6 LIMIT 7;
UPDATE t1 SET a = 7 WHERE a = 3 LIMIT 7;
UPDATE t1 SET a = 8 WHERE a = 0 LIMIT 6;
-INSERT INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
DELETE FROM t1 WHERE a < 9 LIMIT 4;
-INSERT INTO t1 ( a ) VALUES ( 7 );
-INSERT INTO t1 ( a ) VALUES ( 6 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 7 );
+INSERT IGNORE INTO t1 ( a ) VALUES ( 6 );
UPDATE t1 SET a = 8 WHERE a = 3 LIMIT 4;
DELETE FROM t1 WHERE a = 2 LIMIT 9;
DELETE FROM t1 WHERE a = 1 LIMIT 4;
@@ -716,7 +717,7 @@ INSERT INTO t1 ( a ) VALUES ( 0 );
DELETE FROM t1 WHERE a < 3 LIMIT 0;
UPDATE t1 SET a = 8 WHERE a = 5 LIMIT 2;
INSERT INTO t1 ( a ) VALUES ( 1 );
-UPDATE t1 SET a = 9 WHERE a < 5 LIMIT 3;
+UPDATE IGNORE t1 SET a = 9 WHERE a < 5 LIMIT 3;
connection slave;
SET GLOBAL SLAVE_TYPE_CONVERSIONS = @saved_slave_type_conversions;
include/diff_tables.inc [master:t1, slave:t1]
diff --git a/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result b/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result
index b4b3fffc696..df1fe125aa4 100644
--- a/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result
+++ b/storage/tokudb/mysql-test/rpl/r/rpl_row_rec_comp_tokudb.result
@@ -6,7 +6,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 varchar(1) DEFAULT '', c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0, c8 bigint(20) DEFAULT 0) ENGINE=TokuDB DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
@@ -19,7 +19,7 @@ connection master;
CREATE TABLE t1 (c1 bigint(20) DEFAULT 0, c2 bigint(20) DEFAULT 0, c3 bigint(20) DEFAULT 0, c4 bigint(20) DEFAULT 0, c5 bigint(20) DEFAULT 0, c6 bigint(20) DEFAULT 0, c7 bigint(20) DEFAULT 0) ENGINE=TokuDB DEFAULT CHARSET=latin1;
INSERT INTO t1 ( c5, c6 ) VALUES ( 1 , 35 );
INSERT INTO t1 ( c5, c6 ) VALUES ( NULL, 35 );
-UPDATE t1 SET c5 = 'a';
+UPDATE IGNORE t1 SET c5 = 'a';
connection slave;
include/diff_tables.inc [master:t1, slave:t1]
connection master;
diff --git a/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result b/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result
index 3efeb757b61..2dae25d4aa4 100644
--- a/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result
+++ b/storage/tokudb/mysql-test/tokudb/r/ctype_cp1250_ch.result
@@ -60,7 +60,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;
@@ -162,7 +162,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;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result
index 21bfb990ba9..5385dcf9d64 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/mod_enum.result
@@ -49,9 +49,11 @@ ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
ERROR 42000: Table 'test_enum' uses an extension that doesn't exist in this XYZ version
set tokudb_disable_hot_alter=1;
set tokudb_disable_slow_alter=0;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
Warnings:
Warning 1265 Data truncated for column 'col2' at row 3
+set sql_mode = DEFAULT;
SELECT * FROM test_enum;
col1 col2
1 value1
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result
index 9e1504a9d89..56e979bda50 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_add_key.result
@@ -38,9 +38,11 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
Warnings:
Warning 1265 Data truncated for column 'c19' at row 1
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result
index 45a12fba8d2..14525a1a426 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_col_rename.result
@@ -38,9 +38,11 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
Warnings:
Warning 1265 Data truncated for column 'c19' at row 1
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result
index d5ff7e092fe..a44e2765355 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_default.result
@@ -38,9 +38,11 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
Warnings:
Warning 1265 Data truncated for column 'c19' at row 1
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result
index 09b0deaf990..f05256b1b3d 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/r/null_bytes_drop_key.result
@@ -38,9 +38,11 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
Warnings:
Warning 1265 Data truncated for column 'c19' at row 1
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ADD KEY (c25);
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test
index 4efa3afd96e..0daf8f442fb 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/mod_enum.test
@@ -50,7 +50,9 @@ ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
set tokudb_disable_hot_alter=1;
set tokudb_disable_slow_alter=0;
+set sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE test_enum MODIFY COLUMN col2 ENUM('value1','value2','value4');
+set sql_mode = DEFAULT;
SELECT * FROM test_enum;
-drop table test_enum; \ No newline at end of file
+drop table test_enum;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test
index 70e2a07e4cc..b69b1bba53d 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_add_key.test
@@ -47,7 +47,9 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test
index 048e39dc757..3aa0d8cb19b 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_col_rename.test
@@ -47,7 +47,9 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test
index a5695e8a4c6..9ac6ccf9343 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_default.test
@@ -47,7 +47,9 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ROW_FORMAT=FIXED KEY_BLOCK_SIZE=1;
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test
index d2726c30ddd..c01d9df01d8 100644
--- a/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test
+++ b/storage/tokudb/mysql-test/tokudb_alter_table/t/null_bytes_drop_key.test
@@ -47,7 +47,9 @@ c31 date,
key(c31)) ENGINE=tokudb;
INSERT INTO t (c25) VALUES (NULL);
UPDATE t SET c27=0;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
ALTER TABLE t ADD PRIMARY KEY(c19,c27)USING HASH;
+SET sql_mode = DEFAULT;
UPDATE t SET c27=0;
ALTER TABLE t ADD KEY (c25);
UPDATE t SET c27=0;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/6684.result b/storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
index b2d393d4469..9a72e882b3c 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/6684.result
@@ -11,12 +11,14 @@ CREATE TABLE `site` (
PRIMARY KEY (`id`),
KEY `owner_title` (`title`)
) ENGINE=TokuDB AUTO_INCREMENT=575 DEFAULT CHARSET=utf8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `screenshot` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`site` int(11) unsigned NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=82720 DEFAULT CHARSET=utf8;
+SET sql_mode = DEFAULT;
INSERT INTO `site` (`id`, `title`)
VALUES
(9, 'Facebook'),
@@ -38,7 +40,9 @@ WHERE screenshot.id IS NULL;
id title id site timestamp
SELECT * FROM site where site.id not in (select screenshot.site from screenshot where timestamp > '2013-04-28 13:30:00');
id title
+set sql_mode = '';
create index `site` on screenshot(`site`);
+set sql_mode = default;
SELECT *
FROM site
LEFT JOIN screenshot
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result b/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result
index e8765ec7ab9..03bcc13efc2 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/alter_table_copy_table.result
@@ -3,6 +3,8 @@ set tokudb_disable_hot_alter=ON;
set default_storage_engine=tokudb;
create table t (id int, x char(2), primary key (id), unique key (x));
insert into t values (1,'aa'),(2,'ab');
+set sql_mode = '';
alter table t modify x char(1);
ERROR 23000: Duplicate entry 'a' for key 'x'
+set sql_mode = default;
drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result
index c8565fb4b2b..600deeae7c6 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db397_delete_trigger.result
@@ -12,9 +12,11 @@ ts timestamp not null default now());
insert into t1 (col1,col2) values (0,0);
insert into t1_audit (col1,action) values (0,'DUMMY');
set local tokudb_prelock_empty=0;
+set sql_mode = '';
create trigger t1_trigger before delete on t1
for each row
insert into t1_audit (col1, action) values (old.col1, 'BEFORE DELETE');
+set sql_mode = default;
insert into t1 (col1,col2) values (1,1);
start transaction;
delete from t1 where col1 = 1;
@@ -32,9 +34,11 @@ locks_dname locks_key_left locks_key_right
./test/t1_audit-main 0200000000000000 0200000000000000
commit;
drop trigger t1_trigger;
+set sql_mode = '';
create trigger t1_trigger after delete on t1
for each row
insert into t1_audit (col1, action) values (old.col1, 'AFTER DELETE');
+set sql_mode = default;
insert into t1 (col1,col2) values (2,2);
start transaction;
delete from t1 where col1 = 2;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result b/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result
index 6b3c239d602..edebae3b9e0 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/db945.result
@@ -7,7 +7,7 @@ set session tokudb_analyze_throttle = 0;
set session tokudb_analyze_time = 0;
create table t1(a int, b text(1), c text(1), filler text(1), primary key(a, b(1)), unique key (a, c(1)));
lock tables t1 write, t1 as a read, t1 as b read;
-insert into t1(a) values(1);
+insert ignore into t1(a) values(1);
Warnings:
Warning 1364 Field 'b' doesn't have a default value
alter table t1 drop key a;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/r/leak172.result b/storage/tokudb/mysql-test/tokudb_bugs/r/leak172.result
index fa98811c803..e3991b42a06 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/r/leak172.result
+++ b/storage/tokudb/mysql-test/tokudb_bugs/r/leak172.result
@@ -1,5 +1,6 @@
set default_storage_engine=tokudb;
drop table if exists t1,t2;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
@@ -118,6 +119,7 @@ KEY `c31` (`c31`)
);
LOAD DATA INFILE 'leak172_t1.data' INTO TABLE `t1` fields terminated by ',';
connect conn1,localhost,root,,;
+set sql_mode = '';
set session debug_dbug="+d,tokudb_end_bulk_insert_sleep";
LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2` fields terminated by ',';
connection default;
@@ -127,3 +129,4 @@ connection conn1;
connection default;
disconnect conn1;
drop table t1,t2;
+set sql_mode = default;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/6684.test b/storage/tokudb/mysql-test/tokudb_bugs/t/6684.test
index 63ddf752512..a5a434de23c 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/6684.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/6684.test
@@ -11,12 +11,14 @@ CREATE TABLE `site` (
KEY `owner_title` (`title`)
) ENGINE=TokuDB AUTO_INCREMENT=575 DEFAULT CHARSET=utf8;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `screenshot` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`site` int(11) unsigned NOT NULL,
`timestamp` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`id`)
) ENGINE=TokuDB AUTO_INCREMENT=82720 DEFAULT CHARSET=utf8;
+SET sql_mode = DEFAULT;
INSERT INTO `site` (`id`, `title`)
VALUES
@@ -44,7 +46,9 @@ WHERE screenshot.id IS NULL;
SELECT * FROM site where site.id not in (select screenshot.site from screenshot where timestamp > '2013-04-28 13:30:00');
# adding either of these two indexes causes the SQL to return an incorrect rowset (1 rows instead of 0 rows)
- create index `site` on screenshot(`site`);
+set sql_mode = '';
+create index `site` on screenshot(`site`);
+set sql_mode = default;
# this query is wrong when one or both of the above indexes is added
SELECT *
@@ -55,4 +59,4 @@ LEFT JOIN screenshot
WHERE screenshot.id IS NULL;
drop table site;
-drop table screenshot; \ No newline at end of file
+drop table screenshot;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test b/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test
index 6e4433183b0..def1ffe366e 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/alter_table_copy_table.test
@@ -7,6 +7,8 @@ set tokudb_disable_hot_alter=ON;
set default_storage_engine=tokudb;
create table t (id int, x char(2), primary key (id), unique key (x));
insert into t values (1,'aa'),(2,'ab');
+set sql_mode = '';
--error 1062
alter table t modify x char(1);
-drop table t; \ No newline at end of file
+set sql_mode = default;
+drop table t;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test
index 79043664607..65ba30624ab 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db397_delete_trigger.test
@@ -20,9 +20,11 @@ insert into t1 (col1,col2) values (0,0);
insert into t1_audit (col1,action) values (0,'DUMMY');
set local tokudb_prelock_empty=0;
+set sql_mode = '';
create trigger t1_trigger before delete on t1
for each row
insert into t1_audit (col1, action) values (old.col1, 'BEFORE DELETE');
+set sql_mode = default;
insert into t1 (col1,col2) values (1,1);
start transaction;
delete from t1 where col1 = 1;
@@ -33,9 +35,11 @@ select locks_dname,locks_key_left,locks_key_right from information_schema.tokudb
commit;
drop trigger t1_trigger;
+set sql_mode = '';
create trigger t1_trigger after delete on t1
for each row
insert into t1_audit (col1, action) values (old.col1, 'AFTER DELETE');
+set sql_mode = default;
insert into t1 (col1,col2) values (2,2);
start transaction;
delete from t1 where col1 = 2;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test b/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test
index 27b0d284484..c7774877291 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/db945.test
@@ -12,7 +12,7 @@ set session tokudb_analyze_time = 0;
create table t1(a int, b text(1), c text(1), filler text(1), primary key(a, b(1)), unique key (a, c(1)));
lock tables t1 write, t1 as a read, t1 as b read;
-insert into t1(a) values(1);
+insert ignore into t1(a) values(1);
alter table t1 drop key a;
unlock tables;
diff --git a/storage/tokudb/mysql-test/tokudb_bugs/t/leak172.test b/storage/tokudb/mysql-test/tokudb_bugs/t/leak172.test
index 9d82604e4b1..f2e31ad8670 100644
--- a/storage/tokudb/mysql-test/tokudb_bugs/t/leak172.test
+++ b/storage/tokudb/mysql-test/tokudb_bugs/t/leak172.test
@@ -13,6 +13,7 @@ let $MYSQLD_DATADIR=`select @@datadir`;
copy_file $MTR_SUITE_DIR/std_data/leak172_t1.data $MYSQLD_DATADIR/test/leak172_t1.data;
copy_file $MTR_SUITE_DIR/std_data/leak172_t2.data $MYSQLD_DATADIR/test/leak172_t2.data;
+SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
CREATE TABLE `t1` (
`c4` int(11) DEFAULT NULL,
`c5` int(11) DEFAULT NULL,
@@ -134,6 +135,7 @@ CREATE TABLE `t2` (
LOAD DATA INFILE 'leak172_t1.data' INTO TABLE `t1` fields terminated by ',';
connect(conn1,localhost,root,,);
+set sql_mode = '';
set session debug_dbug="+d,tokudb_end_bulk_insert_sleep";
send LOAD DATA INFILE 'leak172_t2.data' INTO TABLE `t2` fields terminated by ',';
@@ -150,3 +152,4 @@ connection default;
disconnect conn1;
drop table t1,t2;
+set sql_mode = default;